import java.io.BufferedReader;
import java.io.InputStreamReader;

public class jeroenb {
	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] args) throws Exception {
		String[] ps = in.readLine().split(" ");
		int h = Integer.valueOf(ps[0]);
		int m = Integer.valueOf(ps[1]);

		h %= 30;
		System.out.println(h * 12 == m ? "yes" : "no");
	}
}
