#include <bits/stdc++.h>
using namespace std;

int main(){
    freopen("neighbors.in", "r", stdin);
    freopen("neighbors.out", "w", stdout);
    int t = 1;
    while(t--){
        int n, m;
        cin >> n >> m;
        bool b1 = false, b2 = false;
        for (int i = 1; i <= n; i++){
            for (int j = 1; j <= n; j++){
                if (--m == 0){
                    b1 = (i == j);
                    b2 = (n - i + 1 == j);
                }
            }
        }
        cout << (b1 ? "yes" : "no") << " " << (b2 ? "yes" : "no") << endl;
    }
}
