#include int main(){ int M,D; std::cin>>M>>D; if((M==12&&D==25)||(M==4&&D==1))std::cout<<-1<