#include <iostream>
using namespace std;

int main() {
	double x,y;
	cin >> x >> y;
	cout << (((x>=-2)&&(x<=3)&&(y>=2)&&(y<=5))||((x>3)&&(x<=5)&&(y>=2)&&(y<=3)) ? "YES": "NO");
	return 0;
}