#include using namespace std; int H,M; int main() { cin>>H>>M; if(H<7 || (H==7&&M<30))cout<<"Yes"<8 || (H==8 && M>30))cout<<"No"<