#include #include using namespace std; using namespace atcoder; #define overload4(_1, _2, _3, _4, name, ...) name #define rep1(n) for(int i = 0; i < (int)(n); ++i) #define rep2(i, n) for(int i = 0; i < (int)(n); ++i) #define rep3(i, a, b) for(int i = (a); i < (int)(b); ++i) #define rep4(i, a, b, c) for(int i = (a); i < (int)(b); i += (c)) #define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__) #define Sort(a) sort(a.begin(), a.end()) #define RSort(a) sort(a.rbegin(), a.rend()) typedef long long int ll; typedef unsigned long long ull; typedef long double ld; typedef vector vi; typedef vector vcr; typedef vector vll; typedef vector vld; typedef vector vst; const ll INF = 0x1fffffffffffffff; const ll MOD = 998244353; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template istream &operator>>(istream &is, pair &p){ is >> p.first >> p.second; return is; } template istream &operator>>(istream &is, vector &v){ for(T &in : v) is >> in; return is; } template ostream &operator<<(ostream &os, const vector &v){ for(int i = 0; i < (int) v.size(); ++i){ os << v[i] << (i + 1 != (int) v.size() ? " " : ""); } return os; } template void in(T&... a){ (cin >> ... >> a); } void out(){ cout << '\n'; } template void out(const T& a, const Ts&... b){ cout << a; (cout << ... << (cout << ' ', b)); cout << '\n'; } // 素数を判定する関数 bool isprime(int N) { if (N < 2) return false; for (int i = 2; i * i <= N; ++i) { if (N % i == 0) return false; } return true; } int main() { ll n; in(n); vll a(n); in(a); set t; rep(i,n){ t.insert(((a[i] % n)+n)%n); } if(t.size() == 1){ out("Yes"); }else{ out("No"); } }