#include<bits/stdc++.h>
#define ll long long
#define dbg(x) cout<<#x<<": "<<x<<endl;
#define N 300005
#define M 1000000007
#define pii pair<ll,ll>
#define fast ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
main()
{
    string s;
    cin>>s;
    bool f=1;
    for(int i=0;i<s.size();i++)
    {
        if(i%2==0&&(s[i]>='A'&&s[i]<='Z')) f=0;
        if(i%2==1&&(s[i]>='a'&&s[i]<='z')) f=0;
    }
    if(f) cout<<"Yes";
    else cout<<"No";
}


/**
*	created: 08.11.2020 21:02:19
**/
#ifdef _LOCAL_
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// #include <boost/math/tools/minima.hpp>
// #include <boost/range/irange.hpp>
using namespace std;
#define int long long
#define name(x) #x
#define dump(x) cout << name(x) << " = " << x << endl;
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define rrep(i,n) for (int i = (int)(n - 1); i >= 0; i--)
#define rep2(i,s,n) for (int i = (s); i < (int)(n); i++)
#define For(i,x) for (auto &i : x)
#define len(x) ll(x.size())
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) ll(__builtin_popcountll(bit))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a * b / __gcd(a,b)
// using boost::math::tools::brent_find_minima;
// using boost::irange;
using ll = long long;
using P = pair<int,int>;
// using bint = boost::multiprecision::cpp_int;
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 9000000000000000000ll;
const int MOD1 = 1000000007;
const int MOD2 = 998244353;
template<typename T> bool chmax(T &a, T b) {if (a < b) {a = b; return 1;} return 0;}
template<typename T> bool chmin(T &a, T b) {if (b < a) {a = b; return 1;} return 0;}
template<typename T> T bpow(T a, int n) {T r(1); while(n) {if (n & 1) r *= a; a *= a; n >>= 1;} return r;}
template<typename T> auto comp(vector<T> a) {sort(all(a)); a.erase(unique(all(a)),a.end()); return a;}
template<typename T,typename U> ostream &operator<<(ostream &os, const pair<T,U> &p) {os << p.first << " " << p.second; return os;}
template<typename T,typename U> ostream &operator<<(ostream &os, const map<T,U> &mp) {For(p,mp) {os << "[" << p << "]\n";} return os;}
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) {rep(i,len(v)) {if(i) os << " "; os << v[i];} return os;}
template<typename T> ostream &operator<<(ostream &os, const set<T> &st) {int c(0); For(x,st) {if (c) os << " "; os << x; c++;} return os;}



void solve() {
    int n; cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    vector<P> v;
    rep2(i,2,1001) {
        int c = 0;
        rep(j,n) if (a[j] % i == 0) c++;
        v.emplace_back(c,i); 
    }
    sort(rall(v));
    cout << v[0].second << endl;
    return;
}

signed main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    return 0;
}