#!/usr/bin/env python3
x,y=map(int,input().split())
print(["no","yes"][y==x%30*12])
