#!/usr/bin/env python3

h, m = map(int, input().split())
print("yes" if m == h * 12 % 360 else "no")
