#include "bits/stdc++.h" #include using namespace std; #include "atcoder/all" using namespace atcoder; using i64 = long long; using uni64 = unsigned long long; using ld = long double; using i_i = pair; using i_b = pair; using l_l = pair; using d_d = pair; using s_s = pair; using i_i_i = tuple; using i_i_i_i = tuple; using l_l_l = tuple; using l_l_l_l = tuple; #define rep(i, n) for(int i = 0; i < n; i++) #define ifbit(n,k) ((n>>k)&1) //if kth bit of n is on then true (sitakara, 0-indexed) #define zpad(i) cout << setfill('0') << setw(i) #define dout cout << fixed << setprecision(10) constexpr int INF = 2147483647; constexpr i64 I64F = 9223372036854775807; constexpr int m1007 = 1000000007; constexpr int m9982 = 998244353; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n; int a, b, c; cin >> a >> b >> c; if (c < a and a < b) { cout << "No" << endl; return 0; } if (c > a and a > b) { cout << "No" << endl; return 0; } if (b < a) { a = n - a + 1; b = n - b + 1; c = n - c + 1; } b = (b + n - a) % n; c = (c + n - a) % n; if (c >= b) cout << "Yes" << endl; else cout << "No" << endl; return 0; }