https://www.acmicpc.net/problem/2884
import java.util.*
import java.lang.String.format
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var h=s.nextInt()
var m=s.nextInt()
m-=45
if(m<0){
h--
m+=60
}
if(h<0) h=23
print(format("%d %d",h,m))
}