add solution to P36 and P37