#!/usr/bin/env python3

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