/*
#include <stdio.h>
int main()
{
int h,b,c,s;
scanf("%d %d %d %d", &h, &b, &c, &s);
printf("%.1f MB", (float)((long long int)h*b*c*s)/8/1024/1024);
return 0;
}
*/
/*
#include <stdio.h>
int main() {
long long int a, b;
scanf("%lld %lld", &a, &b);
printf("%lld", a+b);
return 0;
}
*/
/*
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%d+%d=%d\n", a,b,(a+b));
printf("%d-%d=%d\n", a,b,(a-b));
printf("%d*%d=%d\n", a,b,(a*b));
printf("%d/%d=%d\n", a,b,(a/b));
return 0;
}
*/
/*
#include <stdio.h>
int main() {
float a, b;
scanf("%f %f", &a, &b);
printf("%.2f", a*b);
return 0;
}
*/
/*
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%.1f", a*b/2.0);
return 0;
}
*/
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
printf("%d %d", a/60,a%60);
return 0;
}