#include<stdio.h>
int main(){
    long long int n,d,quotient,reminder;
    scanf("%lld",n);
     scanf("%lld",d);
     if(n!=1||d!=1||d==0){
         printf("Invalid input");
     }
     else{
         quotient=n/d;
         reminder=n%d;
         printf("%lld,%lld", quotient, reminder),
     }
}