#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
typedef long long ll;
int n;
ll ans=1;
ll gcd(ll ta,ll tb){
    return tb?gcd(tb,ta%tb):ta;
}
int main(){
    scanf("%d",&n);
    for(int i=2;i<=n;i++) ans=ans*i/gcd(ans,i);
    if(ans+1<=n) ans=(n/ans+1)*ans;
    printf("%lld\n",ans+1);
    return 0;
}

#include <cctype>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iostream>
#include <utility>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <climits>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <regex>
#include <set>
#include <bitset>

const int64_t infl = 1LL << 60;
const int64_t cc = pow(10, 9) + 7;
bool sort_pair(std::pair<int64_t, int64_t> origin, std::pair<int64_t, int64_t> another){return origin.first < another.first;}
template <typename T> bool chmin(T &a, const T& b) {if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b) {if(a < b) {a = b;return true;}return false;}

int main()
{
    int64_t n,m,q,k;
    std::vector< int64_t > list;

    n = 0;
    std::string s;
    std::cin>> s;

    for( int i = 0; i < s.size(); i++ )
    {
        if( ( i % 2 == 0 ) && std::isupper( s[i] ) )
        {
            n = -1;
            break;
        }

        if( ( i % 2 == 1 ) && std::islower( s[i] ) )
        {
            n = -1;
            break;
        }        
    }

    if( n == -1 ) std::cout<< "No";
    else std::cout<< "Yes";
}

