#include <stdio.h>
int main(void) {
int seat, row, position;
scanf("%d", &seat);
if(seat<=2500){
printf("1 ");
row=seat/25+1;
position=seat%25;
if(seat%25==0){
printf("%d 25", row-1);
}
else{
printf("%d %d", row, position);
}
}
else if(2500<seat && seat<=7500){
printf("2 ");
row=(seat-2500)/50+1;
position=(seat-2500)%50;
if(seat%50==0){
printf("%d 50", row-1);
}
else{
printf("%d %d", row, position);
}
}
else{
printf("3 ");
row=(seat-7500)/25+1;
position=(seat-7500)%25;
if(seat%25==0){
printf("%d 25", row-1);
}
else{
printf("%d %d", row, position);
}
}
return 0;
}