995
#include<bits/stdc++.h> using namespace std; int main(){ int m,d; cin>>m>>d; if(m==12&&d==31){ m=1; d=1; }else if((m!=12&&d==31)||(m!=12&&d==30)||(m!=12&&d==28)){ m++; d=1; }else{ d++; } cout<<m<<" "<<d; return 0; }
5!