for n in range(1,101): while n:m=n;n%=n<17or-n/60*~9;print[m-n,'4 20'][m-n==80], print