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