time=int(input())
hrs=time//60
if(time<60):
    mins=time
else:
    mins=time%60
print(str(hrs) +" " + str(mins))

f4f71ba7364a7b9674bb06c56762ab2ade2d8a4c
<mask token>

<mask token>
if time < 60:
    mins = time
else:
    mins = time % 60
print(str(hrs) + ' ' + str(mins))

time = int(input())
hrs = time // 60
if time < 60:
    mins = time
else:
    mins = time % 60
print(str(hrs) + ' ' + str(mins))

time=int(input())
hrs=time//60
if(time<60):
    mins=time
else:
    mins=time%60
print(str(hrs) +" " + str(mins))
