#include using namespace std; using ll=long long; int main(){ ll h,m; cin>>h>>m; ll s=h*3600+m*60+30; ll left=7*3600+30*60; ll right=8*3600+30*60; if(s<=left){ cout<<"Yes"<