Var a: integer;begin read(a); if (a >= 1) and (a <= 31) then write(a,' ',1);<span> if (a >= 32) and (a <= 59) then write((a - 31),' ',2);</span> if (a >= 60) and (a <= 90) then write((a - 59),' ',3);</span> if (a >= 91) and (a <= 120) then write((a - 90),' ',4);</span> if (a >= 121) and (a <= 151) then write((a - 120),' ',5);</span> if (a >= 152) and (a <= 181) then write((a - 151),' ',6);</span> if (a >= 182) and (a <= 212) then write((a - 181),' ',7);</span> if (a >= 213) and (a <= 243) then write((a - 212),' ',8);</span> if (a >= 244) and (a <= 273) then write((a - 243),' ',9);</span> if (a >= 274) and (a <= 304) then write((a - 273),' ',10);</span> if (a >= 305) and (a <= 334) then write((a - 304),' ',11);</span> if (a >= 335) and (a <= 365) then write((a - 334),' ',12);</span> readln; readlnend.