#include #define f(i, s, k, l) for (int i = s; i < k; i += l) #define for0(i, k) f(i, 0, k, 1) #define pl pair #define pb push_back #define vl vector #define vi vector #define sz(x) (ll)(x).size() using namespace std; using ll = long long; using ld = float; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll x, y; cin >> x >> y; if (2 * (x % 30) == y / 6) cout << "yes" << endl; else cout << "no" << endl; }