#include <iostream>

using namespace std;
int main()
{
        int n,m,k,i,j;
        while (scanf("%d %d %d",&n,&m,&k)!=EOF)
        {
                if(k>=m)
                {
                        printf("1\n");
                        continue;
                }
				if(k+n<m)
				{
					 printf("0\n");
                        continue;

				}
                double ans = 1;
                for (i=0;i<=k;i++)
                {
                        ans *= m-i;
                        ans /= n+i+1;
                }
                printf("%.4lf\n",1.0-ans);
        }

}


#include <iostream>

using namespace std;
int MAX(int a,int b)
{
	return a>b?a:b;
}
int main()
{
        int n,m,k,i,j;
        while (scanf("%d %d %d",&n,&m,&k)!=EOF)
        {
                if(k>=m)
                {
                        printf("1\n");
                        continue;
                }
			/*	if(k+n<m)
				{
					 printf("0\n");
                        continue;

				}*/
                double ans = 1;
                for (i=0;i<=k;i++)
                {
                        ans *= m-i;
                        ans /= n+i+1;
                }
                printf("%.4lf\n",MAX(1.0-ans,0));
        }

}


#include <iostream>
using namespace std;
int main ()
{
	double sum;
	int n,m,k,i;
	while(scanf("%d%d%d",&n,&m,&k)!=EOF)
	{
		sum=1;
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		for (i=0;i<=k;i++)
		{
			sum *= m-i;
			sum /= n+i+1;
		}
		printf("%.6lf\n",1.0-sum);
	}
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <iostream>
using namespace std;

double good_p(int m, int n)
{return (n+1-m+0.)/(n+1);}

int main()
{
    /*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    int n, m, k, i;
    double p=0., q=0., tmp, v=1., tmp1;
    scanf("%d %d %d", &n, &m, &k);
    if (n+k<m) {printf("0.000000000"); return 0;}
    //if (!k) {printf("%.12lf", good_p(m, n)); return 0;}
    for(i=0; i<k; i++) v=v*(m-i+0.)/(n+m-i+0.);
    for(i=0; i+k<m; i++)
    {
        if (i>=1)
        {
            v=v*(n-i+1+0.)/(n+m-(i+i+k-2)+0.);
            v=v*(i+i+k-1+0.)/(i+0.);
            v=v*(m-i-k+1+0.)/(n+m-(i+i+k-1)+0.);
            v=v*(i+i+k+0.)/(i+k);
        }
        tmp=good_p(i, i+k);
        q+=v*tmp*(m-k-i+0.)/(m+n-k-i-i+0.);
    }
    p=1.-q;
    printf("%.12lf", p);
}


#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <list>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <numeric>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-8;
typedef long long ll;
typedef complex <double> pt;

int main() {
	//ifstream fin("input.txt", ios::in);
	//FILE *fpin=fopen("input.txt", "r");
	istream &fin=cin;
	FILE *fpin=stdin;

	int n, m, k;
	fin >> n >> m >> k;

	cout << fixed << setprecision(13);
	if(n+k<m) {
		cout << 0. << endl;
		return  0;
	}
	if(m<=k) {
		cout << 1. << endl;
		return 0;
	}

	double res=1;
	for(int i=0; i<=k; i++) res*=n+1+i;
	double sub=1;
	for(int i=0; i<=k; i++) sub*=m-i;

	res=(res-sub)/res;
	cout << res << endl;
}


#include<iostream>
using namespace std;
int main()
{
	int m,n,k;
	double ans;
	int i;
	while(scanf("%d%d%d",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		ans=1;
	/*	for(i=1;i<=n;i++)
		{
			ans*=i;
			ans/=k+i+1;
		}
		for(i=1;i<=k+1;i++)
		{
			ans/=i;
		}
		for(i=1;i<=m-k-1;i++)
		{
			ans*=(m-i+1);
			ans/=i;
		}
		for(i=1;i<=k+1;i++)
			ans*=i;
		*/
		for (i=0;i<=k;i++)
		{
			ans *= m-i;
			ans /= n+i+1;
		}

		printf("%.4lf\n",(1.0-ans));

	}
	return 0;
}


#include<iostream>
using namespace std;
int main()
{
	int m,n,k;
	double ans;
	int i;
	while(scanf("%d%d%d",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		ans=1;
		for(i=1;i<=n;i++)
		{
			ans*=i;
			ans/=k+i+1;
		}
		for(i=1;i<=k+1;i++)
		{
			ans/=i;
		}
		for(i=1;i<=m-k-1;i++)
		{
			ans*=(m-i+1);
			ans/=i;
		}
		for(i=1;i<=k+1;i++)
			ans*=i;
		printf("%.6lf\n",(1.0-ans));

	}
	return 0;
}


#include<iostream>
using namespace std;
int main()
{
	double m,n,k;
	double ans;
	int i;
	while(scanf("%lf%lf%lf",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		ans=1;
		for(i=1;i<=n;i++)
		{
			ans*=i;
			ans/=k+i+1;
		}
		for(i=1;i<=k+1;i++)
		{
			ans/=i;
		}
		for(i=1;i<=m-k-1;i++)
		{
			ans*=(m-i+1);
			ans/=i;
		}
		for(i=1;i<=k+1;i++)
			ans*=i;
		printf("%.6lf\n",(1.0-ans));

	}
	return 0;
}


#include<iostream>
using namespace std;
int main()
{
	double m,n,k;
	double ans;
	int i;
	while(scanf("%lf%lf%lf",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		ans=1;
		for(i=1;i<=n;i++)
		{
			ans*=i;
			ans/=k+i+1;
		}
		for(i=1;i<=k+1;i++)
		{
			ans/=i;
		}
		for(i=1;i<=m-k-1;i++)
		{
			ans*=(m-i+1);
			ans/=i;
		}
		for(i=1;i<=k+1;i++)
			ans*=i;
		printf("%.6lf\n",(1-ans));

	}
	return 0;
}


#include<iostream>
using namespace std;
int main()
{
	int m,n,k;
	double ans;
	int i;
	while(scanf("%d%d%d",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		if(k+n<m)
		{
			printf("0\n");
			continue;
		}
		ans=1;
		for(i=1;i<=n;i++)
		{
			ans*=i;
			ans/=k+i+1;
		}
		for(i=1;i<=k+1;i++)
		{
			ans/=i;
		}
		for(i=1;i<=m-k-1;i++)
		{
			ans*=(m-i+1);
			ans/=i;
		}
		for(i=1;i<=k+1;i++)
			ans*=i;
		printf("%.4lf\n",(1.0-ans));

	}
	return 0;
}


#include <stdio.h>

int main(){
	double r;
	int n,m,k,i;
	while (scanf("%d %d %d",&n,&m,&k)>0){
		r=1;
		for (i=1;i<=k+1;i++)
			r*=(double)(m-k+i-1)/(double)(n+i);
		printf("%f\n",1-r);
	}
	return 0;
}


#include <stdio.h>

int main(){
	double r;
	int n,m,k,i;
	while (scanf("%d %d %d",&n,&m,&k)>0){
		r=1;
		for (i=0;i<=k;i++)
			r*=(m-i)/(double)(i+n+1);
		printf("%lf\n",1-r);
	}
	return 0;
}


#include <stdio.h>

int main(){
	double n,m,k,r;
	int i;
	while (scanf("%lf %lf %lf",&n,&m,&k)>0){
		r=1;
		for (i=0;i<=k;i++)
			r*=(m-i)/(i+n+1);
		printf("%.5lf\n",1-r);
	}
	return 0;
}


#include <stdio.h>

int main(){
	double r,eps=1e-7;
	int n,m,k,i;
	while (scanf("%d %d %d",&n,&m,&k)>0){
		r=1;
		for (i=0;i<=k;i++)
			r*=(m-i)/(double)(i+n+1);
		if (r<eps)
			printf("1\n");
		else if (1-r<eps)
			printf("0\n");
		else
			printf("%lf\n",1-r);
	}
	return 0;
}


#include <stdio.h>

int main(){
	double n,m,k,r;
	int i;
	while (scanf("%lf %lf %lf",&n,&m,&k)>0){
		r=1;
		for (i=0;i<=k;i++)
			r*=(m-i)/(i+n+1);
		printf("%lf\n",1-r);
	}
	return 0;
}


#include <stdio.h>

int main(){
	double r;
	int n,m,k,i;
	while (scanf("%d %d %d",&n,&m,&k)>0){
		r=1;
		for (i=1;i<=k+1;i++)
			r*=(double)(m-k+i-1)/(double)(n+i);
		printf("%lf\n",1-r);
	}
	return 0;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
double f(int n,int m,int k){
    if(n+k<m){
        return 0;
    }
    else if(m==0){
        return 1;
    }
    else{
        double ans=1;
        for(int i=0;i<=k;i++){
            ans=(ans*(m-i)/(n+1+i));
        }
        ans=1-ans;
    }
}

int main(){
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(n+k<m){
        printf("0\n");
    }
    else if(m<=k){
        printf("1\n");
    }
    else{
        double ans=1;
        for(int i=0;i<=k;i++){
            ans=(ans*(m-i)/(n+1+i));
        }
        ans=1-ans;
        printf("%.6lf\n",ans);
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<map>
using namespace std;
map<int ,int >s1;
map<int ,map<int ,int > >s2;

int f(int n,int m,int k){
    if(s2[n].count(m)!=0)return s2[n][m];

    if(n+k<m){
        return s2[n][m]=0;
    }
    if(m==0){
        return s2[n][m]=1;
    }
    return s2[n][m]=f(n-1,m,k)+f(n,m-1,k);
}
const int N = 100000 + 5;
const int MOD = (int)1e9 + 7;
int F[N], Finv[N], inv[N];
void init(){
    inv[1] = 1;
    for(int i = 2; i < N; i ++){
        inv[i] = (MOD - MOD / i) * 1ll * inv[MOD % i] % MOD;
    }
    F[0] = Finv[0] = 1;
    for(int i = 1; i < N; i ++){
        F[i] = F[i-1] * 1ll * i % MOD;
        Finv[i] = Finv[i-1] * 1ll * inv[i] % MOD;
    }
}
int comb(int n, int m){
    if(m < 0 || m > n) return 0;
    return F[n] * 1ll * Finv[n - m] % MOD * Finv[m] % MOD;
}
int main(){
    init();
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(n+k<m){
        printf("0\n");
    }
    else if(m<=k){
        printf("1\n");
    }
    else{
        printf("%.6lf\n",1.0*f(n,m,k)/comb(n+m,n));
    }
    return 0;
}


#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<set>
#include<list>
#include<map>
#include<deque>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<time.h>
#include<numeric>
#include<functional>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<cmath>

using namespace std;
#define INF  ((1 << 29) - 1)
#define eps 1e-9
#define PI 3.14159265358979323846
#define MP make_pair
#define PB push_back
#define all(v) (v).begin(), (v).end()
typedef long long ll;

double calc(int n, int m, int k){
	if (n + k < m) return 0;
	if (k >= m) return 1;
	double res = 1.0, numerator = m - k, denominator = n + 1;
	for (int it = 0; it < k + 1; ++it){
		res *= numerator / denominator;
		numerator += 1.0;
		denominator += 1.0;
	}
	return 1.0 - res;
}
int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n, m, k;
	cin >> n >> m >> k;
	printf("%0.4lf\n", calc(n, m, k));
	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE

#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <queue>
#include <iostream>
#include <sstream>
#include <stack>
#include <deque>
#include <cmath>
#include <memory.h>
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <algorithm>
#include <utility>

using namespace std;

#define FOR(i, a, b) for(int i = a; i < b; ++i)
#define RFOR(i, b, a) for(int i = b - 1; i >= a; --i)
#define REP(i, N) FOR(i, 0, N)
#define RREP(i, N) RFOR(i, N, 0)

#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define ABS(A) ((A) < 0 ? (-(A)) : (A))
#define ALL(V) V.begin(), V.end()
#define SIZE(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define EPS 1e-7
#define Pi 3.14159265358979

typedef long long Long;
typedef unsigned long long ULong;
typedef unsigned int Uint;
typedef unsigned char Uchar;
typedef vector <int> VI;
typedef pair <int, int> PI;

int n, m, k;

int main()
{
	cin >> n >> m >> k;
	if(k + n - m < 0)
	{
		puts("0");
		return 0;
	}
	if(k >= m)
	{
		puts("1");
		return 0;
	}
	double res = 1;
	REP(i, k + 1)
		res *= (m - i) / (double)(n + i + 1);
	printf("%.10lf\n", 1 - res);
	return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

int C(int n,int m)
{
    int i;
    __int64 mm,nn;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(m<0)
        return 0;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

int C(int n,int m)
{
    int i;
    __int64 mm,nn;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(m==0)
        return 1;
    if(m<0)
        return 0;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    if(m<0)
        return 0;
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&n,&m,&k)!=EOF)
    {
        if(m<=k)
            printf("1\n");
        else
        {
            if(C(n+m,m)==0)
                printf("0");
            else
                printf("%.6lf\n",double(C(n+m,m)-C(n+m,m-k-1))*1.0/C(n+m,m)*1.0);
        }
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

int C(int n,int m)
{
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(m==0)
        return 1;
    if(m<0)
        return 0;
    if(nn/mm==0)
        return 1;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        if(n-k-1<0)
            printf("1\n");
        else
            printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    if(m<0)
        return 0;
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(mm==0)
        return 1;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&n,&m,&k)!=EOF)
    {
        if(m<=k)
            printf("1\n");
        else
        {
            if(C(n+m,m)==0)
                printf("0");
            else
                printf("%.6lf\n",double(C(n+m,m)-C(n+m,m-k-1))*1.0/C(n+m,m)*1.0);
        }
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

int C(int n,int m)
{
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(m==0)
        return 1;
    if(m<0)
        return 0;
    if(nn/mm==0)
        return 1;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    int i;
    __int64 mm,nn;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    if(m<0)
        return 0;
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    if(m<0)
        return 0;
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&n,&m,&k)!=EOF)
    {
        if(m<=k)
            printf("1\n");
        else
            printf("%.6lf\n",double(C(n+m,m)-C(n+m,m-k-1))*1.0/C(n+m,m)*1.0);
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        if(n==0)
            printf("1\n");
        else if(n<k)
            printf("1\n");
        else
            printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

#define Max(a,b) ((a)>(b)?(a):(b))

__int64 C(int n,int m)
{
    int i;
    __int64 mm=1,nn=1;
    for(i=mm=1;i<=m;i++)
        mm*=i;
    for(i=0,nn=1;i<m;i++)
        nn *= (n-i);
    return nn/mm;
}

int main()
{
    int n,m,k;
    while(scanf("%d%d%d",&m,&n,&k)!=EOF)
    {
        if(n==0)
            printf("1\n");
        else if(n-k-1<0)
            printf("1\n");
        else
            printf("%.6lf\n",double(((C(n+m,n)-C(n+m,n-k-1))*1.0)/C(n+m,n)*1.0));
    }
    return 0;
}


#include <stdio.h>
#include <string.h>

int main()
{
        //freopen("in.txt","r",stdin);
        int n,m,k,i;
        while(scanf("%d%d%d",&n,&m,&k)>0)
        {
                if(k>=m) puts("1"); else
                if(n+k<m) puts("0"); else
                {
                        double ans=1;
                        for(i=0;i<=k;i++)
                                ans*=double(m-i)/(n+i+1);
                        printf("%.6lf\n",1-ans);
                }
        }
        return 0;
}


#include <vector>
#include <map>
#include <cstdio>
#include <memory.h>
#include <set>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cmath>
#include <ctime>
#include <numeric>

using namespace std;

#define SZ(a) ((int)(a).size())
#define SQR(a) ((a)*(a))
#define FOR(i, a, b) for(int i=(a), _b(b); i<_b; ++i)
#define FORD(i, b, a) for(int i=(b)-1, _a(a); i>=_a; --i)
#define FILL(a, b) memset(a, b, sizeof(a))
#define FHAS(a, b) (find((a).begin(), (a).end(), (b))!=(a).end())
#define HAS(a, b) ((a).find(b) != (a).end())
#define HASB(a, b) ((a & (1 << b))>0)

template<class A, class B> A convert(B x) {stringstream s; s << x; A r; s >> r; return r;}

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long LL;

int main() {

	//freopen("input.txt", "r", stdin);
	int n, m, k; scanf("%d %d %d", &n, &m, &k);
	double res;
	if (k>=m) res=0; else
	if (n+k<m) res=1; else {
		res=1;
		FOR(i, 0, k+1)
			res *= (double)(m-i)/(double)(n+i+1);
	}

	printf("%.4lf\n", 1.-res);

	return 0;
}


#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){
	int n, m, k;
	cin >> n >> m >> k;
	if (m > n + k){
		cout << 0 << endl;
	} else if (m <= k){
		cout << 1 << endl;
	} else {
		double ret = 1;
		for (int i=0; i<=k; i++){
			ret *= (double)(m-i)/(n+i+1);
		}
		cout << fixed << setprecision(10) << 1-ret << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;

int ce(int n, int k){
    int ret = 1;
    for (int i=0; i<k; i++){
        ret = (ret * (n-i))/(i+1);
    }
    return ret;
}

int f(int n, int m, int mn){
    if (m <= mn){
        return 0;
    }
    int ret = 0;
    for (int k=m; k<=min(n+m, 2*m-1-mn); k++){
        ret += ce(k-1, m-1);
    }
    ret += (n-m+1+mn) * f(n, m-1, mn);
    return ret;
}

int main(){
    int n, m, k;
    cin >> n >> m >> k;
    cout << 1.0 - (double)(f(n, m, k))/ce(n+m, m);
    return 0;
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1.000000000 << endl;
        return 0;
    }
    if(N+K+1<M)
    {
        cout << 0.000000000 << endl;
        return 0;
    }
    long double res = 1.0;
    FOR(i,K+1)
    {
        res *= (long double)(M-i);
        res /= (long double)(N+K+1-i);
    }
    printf("%.12lf\n",1.0-res);
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1 << endl;
        return 0;
    }
    double res = 1.0;
    FOR(i,N+K+1)
    {
        res *= (double)(N+M-i)/(double)(N+K+1-i);
    }
    FOR(i,N)
    {
        res *= (double)(N-i)/(double)(N+M-i);
    }
    cout << 1.0-res << endl;
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1 << endl;
        return 0;
    }
    double res = 1.0;
    FOR(i,N+K+1)
    {
        res *= (double)(N+M-i)/(double)(N+K+1-i);
    }
    FOR(i,N)
    {
        res *= (double)(N-i)/(double)(N+M-i);
    }
    printf("%.5lf\n",1.0-res);
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1.000000000 << endl;
        return 0;
    }
    double res = 1.0;
    FOR(i,N+K+1)
    {
        res *= (double)(N+M-i)/(double)(N+K+1-i);
    }
    FOR(i,N)
    {
        res *= (double)(N-i)/(double)(N+M-i);
    }
    printf("%.12lf\n",1.0-res);
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1.000000000 << endl;
        return 0;
    }
    long double res = 1.0;
    FOR(i,K+1)
    {
        res *= (long double)(M-i);
        res /= (long double)(N+K+1-i);
    }
    printf("%.12lf\n",1.0-res);
}


#include <iostream>
#include <iomanip>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <cstdio>

#define FOR(i,x) for(int i = 0 ; i < x ; i++)

using namespace std;

int main()
{
    int N,M,K;
    cin >> N >> M >> K;
    if(M<K+1)
    {
        cout << 1.000000000 << endl;
        return 0;
    }
    double res = 1.0;
    FOR(i,N)
    {
        res *= (double)(N-i);
        res /= (double)(N+M-i);
    }
    FOR(i,N+K+1)
    {
        res *= (double)(N+M-i);
        res /= (double)(N+K+1-i);
    }
    printf("%.12lf\n",1.0-res);
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	int n, m, k;
	scanf("%d %d %d", &n, &m, &k);
	if (m > n + k)
	{
		printf("0.000000");
		return 0;
	}
	long double res = 1.0;

	for (int i = m - k; i <= m; ++i)
		res *= i;
	for (int i = n + 1; i <= n + k + 1; ++i)
		res /= i;

	res = 1 - res;
	printf("%.4llf", res);

	return 0;
}


#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#pragma comment(linker, "/STACK:16777216")
using namespace std;

#define bit(n) (1<<(n))
#define inf 1000000000
#define eps 1e-9
#define PI 3.1415926535897932385
#define pb push_back
#define sz size()
#define mp make_pair
#define cl clear()
#define all(a) a.begin(),a.end()
#define fill(ar,val) memset(ar,val,sizeof ar)
#define MIN(a,b) if(a>(b)) a=(b)
#define MAX(a,b) if(a<(b)) a=(b)
#define sqr(x) ((x)*(x))
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))

typedef vector<int> VI;
typedef pair<int,int> PII;
typedef __int64 LL;

int main()
{
	//freopen("in.txt","r",stdin);
	int n,m,k,i;
	while(scanf("%d%d%d",&n,&m,&k)>0)
	{
		if(k>=m) puts("1"); else
		if(n+k<m) puts("0"); else
		{
			double ans=1;
			for(i=0;i<=k;i++)
				ans*=double(m-i)/(n+i+1);
			printf("%.5lf\n",1-ans);
		}
	}
	return 0;
}


#include <cstdio>
#include <cmath>

int n, m, k;

int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (n + k < m) puts("0");
	else if (k >= m) puts("1");
	else {
		long double res = 0;
		for (int i = 0; i <= k; i++) res += log(m - (long double)i) - log(n + i + 1.0);
		printf("%.15lf\n", 1 - exp(res));
	}
	return 0;
}


#include <iostream>
using namespace std;
double s,k,n,m,i;
int main()
{
  cin>>n>>m>>k;
		  s=1;
		  for(i=1;i<=k+1;i++)s=s*double(m-i+1)/double(n+i);
	  printf("%.4f\n",1-s);
}


#include <iostream>
using namespace std;
double s,k,n,m,i;
int main()
{

  cin>>n>>m>>k;
  if(k+n-m<0)s=1;else
          if(k-m>=0)s=0;else
          {
                  s=1;
                  for(i=1;i<=k+1;i++)s*=(m-i+1)/(n+i);

          }
          printf("%.4f\n",1-s);
}


#include <iostream>
using namespace std;
double s,k,n,m,i;
int main()
{

  cin>>n>>m>>k;
  if(k+n-m<0)s=1;else
	  if(k-m>=0)s=0;else
	  {
		  s=1;
		  for(i=1;i<=k+1;i++)s=s*double(m-i+1)/double(n+i);

	  }
	  printf("%.4f\n",1-s);
}


//#include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
int k,n,m,i;
double s;
int main()
{
  //freopen("input.txt","r",stdin);
  cin>>n>>m>>k;
  if(k+n-m<0)cout<<"0"<<endl;else
	  if(k-m>=0)cout<<"1"<<endl;else
	  {
		  s=1;
		  for(i=1;i<=k+1;i++)s=s*double(m-i+1)/double(n+i);
		  printf("%.4f\n",1-s);
	  }
}


//#include "stdafx.h"
#include <iostream>
using namespace std;
double s,k,n,m,i;
int main()
{
  //freopen("input.txt","r",stdin);
  cin>>n>>m>>k;
  if(k+n-m<0)s=1;else
          if(k-m>=0)s=0;else
          {
                  s=1;
                  for(i=1;i<=k+1;i++)s*=(m-i+1)/(n+i);

          }
          printf("%.4f\n",1-s);
}


#include<cstdlib>
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string>

int a, b, k;

int main()
{
    scanf("%d%d%d", &b, &a, &k);

    if (b + k < a)
    {
          printf("%.12f\n", 0.0f);
          return 0;
    }

    double ans = 1;
    for (int i = 0; i <= k; i ++)
    {
        ans *= (a - i);
        ans /= (b + 1 + i);
    }
    ans = 1 - ans;

    printf("%.12f\n", ans);
    return 0;
}


#include<cstdlib>
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string>

int a, b, k;

int main()
{
    scanf("%d%d%d", &b, &a, &k);
    double ans = 1.0f;
    for (int i = 0; i <= k; i ++)
    {
        ans *= (a - i);
        ans /= (b + 1 + i);
    }
    ans = 1.0f - ans;

    printf("%.6f\n", ans);
    return 0;
}


#include <iostream>
#include <iomanip>

int main()
{
	int n, m, k;
	std::cin >> n >> m >> k;
	if (m > k + n)
	{
		std::cout << "0";
		return 0;
	}
	double d = 1.0;
	for (int i = 0; i < k + 1; ++i)
	{
		d *= m - i;
		d /= n + k + 1 - i;
	}
	std::cout << std::setprecision(6) << 1 - d;
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef pair<int,int> ii;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mp make_pair
#define go(i,n) for(int i=0;i<n;i++)

void oku(){

int _n,_m,k;
cin>>_n>>_m>>k;

if(_m>_n+k) {printf("0.0000"); return;}

double n=_n*1.0;
double m=_m*1.0;
double bir=1.0;
double eki=1.0;

for(int i=0;i<=k;i++)
bir*=(m-i);
for(int i=1;i<=k+1;i++)
eki*=(n+i);

bir/=eki;
bir=1.0-bir;
printf("%.10f",bir);

}

int main(){
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);

oku();

return 0;}


#!/usr/bin/python3.5
# -*- coding: utf-8 -*-
import json
import sys

def main():
    n, m, k = map(int, input().strip().split())
    if n + k < m:
        print(0)
        return
    ans = 1.0
    for i in range(k+1):
        ans *= (m - i) * 1.0 / (n + i + 1)
    print(1.0 - ans)

if __name__ == '__main__':
    main()


def find(A):
    n,m,k=A
    if m<k:
        return 1

    temp1=1
    temp2=1
    for i in range(k+1):
        temp1*=(m-i)
        temp2*=(n+i+1)
    return 1-temp1/temp2
print(find(list(map(int,input().strip().split(' ')))))


def find(A):
    n,m,k=A
    if m<k:
        return 1

    temp1=1
    temp2=1
    for i in range(k+1):
        temp1*=(m-i)
        temp2*=(n+i+1)
    return max(1-temp1/temp2,0)
print(find(list(map(int,input().strip().split(' ')))))


n,m,k = map(int,input().split())
if m >k and m < n+k:
    res= 1
    for x in range(k+1):
        res*=(m-x)/(n+k-(x-1))
    print(1-res)
else:
    print(0 if m > n+k else 1)


n,m,k = map(int,input().split())
if m >k and m <= n+k:
    res= 1
    for x in range(k+1):
        res*=(m-x)/(n+k-(x-1))
    print(1-res)
else:
    print(0 if m > n+k else 1)


n,m,k=map(int,input().split())
if k<m<=k+n:
	t=1
	for i in range(k+1):
		t*=(m-i)/(n+k-(i-1))
	print(1-t)
else:
	print(0 if m>n+k else 0)


n,m,k=map(int,input().split())
if k<m<=k+n:
	t=1
	for i in range(k+1):
		t*=(m-i)/(n+k-(i-1))
	print(1-t)
else:
	print(0 if m>n+k else 1)


# METO Bot 0.9.9
n,m,k=map(int,input().split())
if k<m<=k+n:
	t=1
	for i in range(k+1):
		t*=(m-i)/(n+k-(i-1))
	print(1-t)
else:
	print(0 if m>n+k else 1)

# Made By Mostafa_Khaled


'''
Calculate the probability of m / (n + k) for each m and n
Print the 1 - the probability
'''
num10NotePeople, num20NotePeople, num10Notes = input().split()
num10NotePeople, num20NotePeople, num10Notes = int(num10NotePeople), int(num20NotePeople), int(num10Notes)

if num10Notes >= num20NotePeople:
	print(1)
elif num20NotePeople > (num10NotePeople + num10Notes):
	print(0)
else:
	num = 1
	den = 1
	for i in range(num10Notes + 1):
		num *= num20NotePeople - i
		den *= num10NotePeople + i + 1

	prob = 1 - num / den;
	print(prob)


import java.util.Scanner;

public class mainB {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int list[] = new int[n];

		for (int i = 0; i < n; i++) {
			list[i] = sc.nextInt();
		}

		int turn = n-list[0];
		System.out.println(turn);
		System.out.println();
		int sign = 1;
		for (int i = 0; i < n; i++) {
			if(sign  == 1){
				list[i] = (list[i]+turn)%n;
			}else if(list[i] < turn){
				list[i] = n-(turn-list[i]);
			}else{
				list[i] -= turn;
			}
			System.out.println(list[i]);
			sign = -sign;
		}

		for (int i = 0; i < n; i++) {
			if(list[i] != i){
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");

	}
}


import java.util.Scanner;

public class mainB {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int list[] = new int[n];

		for (int i = 0; i < n; i++) {
			list[i] = sc.nextInt();
		}

		int turn = n-list[0];
		int sign = 1;
		for (int i = 0; i < n; i++) {
			if(sign  == 1){
				list[i] = (list[i]+turn)%n;
			}else if(list[i] < turn){
				list[i] = n-(turn-list[i]);
			}else{
				list[i] -= turn;
			}
			sign = -sign;
		}

		for (int i = 0; i < n; i++) {
			if(list[i] != i){
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");

	}
}


import java.util.Scanner;

public class CaseOfFakeNumbers {
	public static int K;
	public static int[] intarray;
	public static Scanner scan;
	public static Boolean booli = true;

	public static void main(String[] args) {
		scan = new Scanner(System.in);
		K = scan.nextInt();
		intarray = new int[K];
		for (int i = 0; i < K; i++)
			intarray[i] = scan.nextInt();
		if (intarray[0] == 0)
			System.out.println(CheckIfDeal());
		else {
			int Times = K - intarray[0];
			for (int i = 0; i < K; i++) {
				if (i % 2 == 0) {
					intarray[i] = Math.abs(intarray[i] + Times) % K;
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				} else {
					if (intarray[i] == 0) {
						intarray[i] = Math.abs(intarray[i] - Times + 1) % K;
					} else {
						intarray[i] = Math.abs(intarray[i] - Times) % K;
					}
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				}
			}
			System.out.println(booli ? "Yes" : "No");

		}

	}

	private static String CheckIfDeal() {
		// TODO Auto-generated method stub
		for (int i = 0; i < K; i++)
			if (intarray[i] != i)
				return "No";
		return "Yes";
	}
}


import java.util.Scanner;

public class CaseOfFakeNumbers {
	public static int K;
	public static int[] intarray;
	public static Scanner scan;
	public static Boolean booli = true;

	public static void main(String[] args) {
		scan = new Scanner(System.in);
		K = scan.nextInt();
		intarray = new int[K];
		for (int i = 0; i < K; i++)
			intarray[i] = scan.nextInt();
		if (intarray[0] == 0)
			System.out.println(CheckIfDeal());
		else {
			int Times = K - intarray[0];
			for (int i = 0; i < K; i++) {
				if (i % 2 == 0) {
					intarray[i] = Math.abs(intarray[i] + Times) % K;
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				} else {
					if (intarray[i] < Times) {
						intarray[i] = Math.abs(K - Times + intarray[i]) % K;
					} else {
						intarray[i] = Math.abs(intarray[i] - Times) % K;
					}
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				}
			}
			System.out.println(booli ? "Yes" : "No");

		}

	}

	private static String CheckIfDeal() {
		// TODO Auto-generated method stub
		for (int i = 0; i < K; i++)
			if (intarray[i] != i)
				return "No";
		return "Yes";
	}
}


import java.util.Scanner;

public class CaseOfFakeNumbers {
	public static int K;
	public static int[] intarray;
	public static Scanner scan;
	public static Boolean booli = true;

	public static void main(String[] args) {
		scan = new Scanner(System.in);
		K = scan.nextInt();
		intarray = new int[K];
		for (int i = 0; i < K; i++)
			intarray[i] = scan.nextInt();
		if (intarray[0] == 0)
			System.out.println(CheckIfDeal());
		else {
			int Times = K - intarray[0];
			for (int i = 0; i < K; i++) {
				if (i % 2 == 0) {
					intarray[i] = Math.abs(intarray[i] + Times) % K;
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				} else {
					if (intarray[i] == 0) {
						intarray[i] = Math.abs(K - Times) % K;
					} else {
						intarray[i] = Math.abs(intarray[i] - Times) % K;
					}
					if (intarray[i] != i) {
						booli = false;
						break;
					}
				}
			}
			System.out.println(booli ? "Yes" : "No");

		}

	}

	private static String CheckIfDeal() {
		// TODO Auto-generated method stub
		for (int i = 0; i < K; i++)
			if (intarray[i] != i)
				return "No";
		return "Yes";
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                A[i] = in.nextInt();
            }
            int step = (N - A[0]) % N;
            boolean valid = true;
            for (int i = 1; i < N; i++) {
                if (i % 2 == 0) {
                    int cand = (i - A[i] + N) % N;
                    valid &= step == cand;
                } else {
                    int cand = (A[i] - i + N) % N;
                    valid &= step == cand;
                }
            }
            out.println(valid ? "Yes" : "No");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();
            int A[] = new int[N];

            for (int i = 0; i < N; i++) {
                A[i] = in.nextInt();
            }
            int step = (N - A[0]) % N;
            for (int i = 1; i < N; i++) {
                if (i % 2 == 0) {
                    if ((i + N - A[i]) % N != step) {
                        out.println("No");
                        return;
                    }
                } else {
                    int cand = (((A[i] - i) % N) + N) % N;
                    if (cand != step) {
                        out.println("No");
                        return;
                    }
                }
            }
            out.println("Yes");
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.util.Scanner;

/**
 *
 * @author redmoonlight
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner read=new Scanner(System.in);
        int n=read.nextInt();
        int tab[]=new int[n];
        for (int i = 0; i < n; i++) {
            tab[i]= read.nextInt();

        }int compt=n;

         while ( compt>=0) {
           boolean test=true;
            for (int i = 0; i < n; i++) {
                if(i%2==0){
                    if(tab[i]==n-1)tab[i]=0;
                    else tab[i]+=1;
                }else{
                    if(tab[i]==0)
                    tab[i]=n-1;
                    else tab[i]-=1;

                }
                if(tab[i]!=i)test=false;
               // System.out.print(tab[i]+" ");

            }

             if(test)break;
            compt--;
        }

        System.out.println(compt!=-1?"Yes":"No");
    }

}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pkg556b;

import java.util.Scanner;

/**
 *
 * @author redmoonlight
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner read=new Scanner(System.in);
        int n=read.nextInt();
        int tab[]=new int[n];
        for (int i = 0; i < n; i++) {
            tab[i]= read.nextInt();

        }int compt=n;

         while ( compt>=0) {
           boolean test=true;
            for (int i = 0; i < n; i++) {
                if(i%2==0){
                    if(tab[i]==n-1)tab[i]=0;
                    else tab[i]+=1;
                }else{
                    if(tab[i]==0)
                    tab[i]=n-1;
                    else tab[i]-=1;

                }
                if(tab[i]!=i)test=false;
               // System.out.print(tab[i]+" ");

            }

             if(test)break;
            compt--;
        }

        System.out.println(compt!=-1?"Yes":"No");
    }

}


import java.util.Scanner;

public class B556 {

    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int array[] = new int[n];
        for(int i=0; i<n; i++){
            array[i] = scanner.nextInt();

        }

        int rotations = n - array[0];

        for(int i=0 ; i<n ; i++){

            if(i%2 == 0){
                if((array[i] + rotations) % n != i ){
                    System.out.println("No");
                    return;
                }
            }else{
                if(array[i] > rotations){
                    if((array[i] - rotations) != i){
                    System.out.println("No");
                        return;
                    }
                }else{
                    if((n-1 - (rotations -array[i])) != i ){
                        System.out.println("No");
                        return;
                        }
                    }
               }
        }
        System.out.println("Yes");

    }
}


import java.util.Scanner;

public class B556 {

    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for(int i=0; i<n;i++){
            System.out.println("value of read input = " + scanner.nextInt());
        }

    }
}


import java.util.Scanner;

public class B556 {

    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int array[] = new int[n];
        for(int i=0; i<n; i++){
            array[i] = scanner.nextInt();

        }

        int rotations = n - array[0];

        for(int i=0 ; i<n ; i++){

            if(i%2 == 0){
                if((array[i] + rotations) % n != i ){
                    System.out.println("No");
                    return;
                }
            }else{
                if(array[i] > rotations){
                    if((array[i] - rotations) != i){
                    System.out.println("No");
                        return;
                    }
                }else{
                    if((n - (rotations -array[i])) != i ){
                        System.out.println("No");
                        return;
                        }
                    }
               }
        }
        System.out.println("Yes");

    }
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
		System.out.println(m);
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(arr[i]!=0)
				{
					if(arr[i]-m>0 && arr[i]-m!=i )
						flag=0;
					else
						if(arr[i]-m<0 && m-arr[i]!=i)
							flag=0;
				}
				else
				{
					if(n-m!=i)
						flag=0;
				}

			}
			else
			{
				if(arr[i]!=n-1)
				{
					if(arr[i]+m!=i)
						flag=0;
				}
				else
				{
					if(-1+m!=i)
						flag=0;
				}
			}
			//System.out.println(flag);
		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(arr[i]!=0)
				{
					if(arr[i]-m!=i )
						flag=0;
				}
				else
				{
					if(n-m!=i)
						flag=0;
				}

			}
			else
			{
				if(arr[i]!=n-1)
				{
					if(arr[i]+m!=i)
						flag=0;
				}
				else
				{
					if(-1+m!=1)
						flag=0;
				}
			}

		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
		//System.out.println(m);
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(i>arr[i] && (m+i-arr[i])!=n)
					flag=0;
				if(arr[i]>i&&arr[i]-i!=m)
					flag=0;
				if(i==arr[i] && m!=n)
					flag=0;
			}
			else
			{
				if(i<arr[i] && (m+arr[i]-i)!=n)
					flag=0;
				if(i>arr[i]&& i-arr[i]!=m)
					flag=0;
				if(i==arr[i] && m!=n)
					flag=0;
			}
		//	System.out.println(flag);
		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
	//	System.out.println(m);
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(arr[i]!=0)
				{
					if(arr[i]-m>0 && arr[i]-m!=i )
						flag=0;
					else
						if(arr[i]-m<0 && m-arr[i]!=i)
							flag=0;
				}
				else
				{
					if(n-m!=i)
						flag=0;
				}

			}
			else
			{
				if(arr[i]!=n-1)
				{
					if(arr[i]+m!=i)
						flag=0;
				}
				else
				{
					if(-1+m!=i)
						flag=0;
				}
			}
			//System.out.println(flag);
		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
	//	System.out.println(m);
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(i>arr[i] && (m+i-arr[i])!=n)
					flag=0;
				else
					if(arr[i]>i&&arr[i]-i!=m)
						flag=0;
			}
			else
			{
				if(i<arr[i] && (m+arr[i]-i)!=n)
					flag=0;
				else
					if(i>arr[i]&& i-arr[i]!=m)
						flag=0;
			}
		//	System.out.println(flag);
		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.util.*;
import java.lang.*;
import java.math.*;;

public class Solution
{
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int max=n-1;
		int[] arr=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=s.nextInt();
		int m=n-arr[0];
		if(m==n)
			m=0;
		//System.out.println(m);
		int flag=1;
		for(int i=1;i<n;i++)
		{
			if(i%2==1)
			{
				if(i>arr[i] && (m+i-arr[i])!=n)
					flag=0;
				if(arr[i]>i&&arr[i]-i!=m)
					flag=0;
				if(i==arr[i] )
				{
					if(m!=n && m!=0)
						flag=0;
				}
			}
			else
			{
				if(i<arr[i] && (m+arr[i]-i)!=n)
					flag=0;
				if(i>arr[i]&& i-arr[i]!=m)
					flag=0;
				if(i==arr[i])
				{
					if(m!=n && m!=0)
						flag=0;
				}
			}
	//	System.out.println(flag);
		}
		if(flag==1)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    FastScanner in;
    PrintWriter out;

    static class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        String nextLine() throws IOException {
            if (st == null || !st.hasMoreTokens())
                return br.readLine();
            StringBuilder result = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens()) {
                result.append(" ");
                result.append(st.nextToken());
            }
            return result.toString();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

    }

    void run() throws IOException {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out, false);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException{
        new Main().run();
    }

    public void printArr(int[] arr){
        for(int i = 0; i < arr.length; i++){
            out.print(arr[i] + " ");
        }
        out.println();
    }

    public long gcd(long a, long b){
        if(a == 0) return b;
        return gcd(b % a, a);
    }

    public void solve() throws IOException{

        int n = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++){
            arr[i] = in.nextInt();
        }

        int move = (n - arr[0]) % n;

        for(int i = 0; i < n; i++){
            arr[i] = (arr[i] + move * (i % 2 == 0 ? 1 : -1) + n) % n;
        }

        for(int i = 0; i < n; i++){
            if(i != arr[i]){
                out.println("NO");
                return;
            }
        }
        out.println("YES");
        return;

    }

}


import java.util.*;

public class MyClass {

    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=s.nextInt();
        }
        if(n==1)
        {
            System.out.println("Yes");
            return;
        }
        int i=1;
        while(i<=n)
        {
            for(int j=0;j<n;j++)
            {
                if(j%2==0)
                {
                    a[j]=(a[j]+1)%n;
                }
                else
                {
                    a[j]=(n+(a[j]-1))%n;
                }
            }
            int k=1;
            for(;k<n;k++)
            {
                if(a[k-1]>=a[k])
                {
                    break;
                }
            }
            if(k==n)
            {
                System.out.println("Yes");
                return;
            }
            i++;
        }
        System.out.println("No");
    }

}


import java.util.*;

public class MyClass {

    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=s.nextInt();
        }

        int i=1;
        boolean isAsc=false;
        //int t=1;
        while(i<n)
        {
            for(int j=0;j<n;j++)
            {
                if(j%2==0)
                {
                    a[j]=(a[j]+1)%n;
                }
                else
                {
                    a[j]=(n+(a[j]-1))%n;
                }
            }
            int k=1;
            for(k=1;k<n;k++)
            {
                if(a[k-1]>a[k])
                {
                    break;
                }
            }
            if(k==n)
            {
                System.out.println("Yes");
                return;
            }
            i++;
        }
        System.out.println("No");
    }

}


import java.util.*;

public class MyClass {

    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=s.nextInt();
        }
        if(n==1)
        {
            System.out.println("Yes");
            return;
        }
        int i=1;
        while(i<n)
        {
            for(int j=0;j<n;j++)
            {
                if(j%2==0)
                {
                    a[j]=(a[j]+1)%n;
                }
                else
                {
                    a[j]=(n+(a[j]-1))%n;
                }
            }
            int k=1;
            for(;k<n;k++)
            {
                if(a[k-1]>a[k])
                {
                    break;
                }
            }
            if(k==n)
            {
                System.out.println("Yes");
                return;
            }
            i++;
        }
        System.out.println("No");
    }

}


import java.util.*;

public class MyClass {

    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=s.nextInt();
        }
        if(n==1)
        {
            System.out.println("Yes");
            return;
        }
        int i=1;
        while(i<n)
        {
            int k=1;
            for(;k<n;k++)
            {
                if(a[k-1]>a[k])
                {
                    break;
                }
            }
            if(k==n)
            {
                System.out.println("Yes");
                return;
            }

            for(int j=0;j<n;j++)
            {
                if(j%2==0)
                {
                    a[j]=(a[j]+1)%n;
                }
                else
                {
                    a[j]=(n+(a[j]-1))%n;
                }
            }

            i++;
        }
        System.out.println("No");
    }

}


import java.util.*;

public class MyClass {

    public static void main(String args[])
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] a=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=s.nextInt();
        }
        if(n==1)
        {
            System.out.println("Yes");
            return;
        }
        int i=1;
        while(i<=n)
        {
            for(int j=0;j<n;j++)
            {
                if(j%2==0)
                {
                    a[j]=(a[j]+1)%n;
                }
                else
                {
                    a[j]=(n+(a[j]-1))%n;
                }
            }
            int k=1;
            for(;k<n;k++)
            {
                if(a[k-1]>a[k])
                {
                    break;
                }
            }
            if(k==n)
            {
                System.out.println("Yes");
                return;
            }
            i++;
        }
        System.out.println("No");
    }

}


//package helloworld;
import java.util.Scanner;
public class Puzzle {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] arg)
	{
		int n = sc.nextInt();
		int arr[] = new int[n];
		for(int i=0;i<n;++i)
		{
			arr[i] = sc.nextInt();
		}
		int loop=0;
		while(arr[0]!=0 || loop>400)
		{
			for(int i=0;i<n;++i)
			{
				if(i%2==0)
				{
					arr[i]++;
					if(arr[i]==n)
					{
						arr[i]%=n;
					}
				}
				else
				{
					if(arr[i]==0)
					{
						arr[i]=n-1;
					}
					else
					{
						arr[i]--;
					}
				}
			}
			loop++;
		}
		int i;
		for(i=0;i<n;++i)
		{
			if(arr[i]!=i)
			{
				break;
			}
		}
		if(i!=n)
		{
			System.out.print("NO");
		}
		else
		{
			System.out.println("YES");
		}
	}
}


//package helloworld;
import java.util.Scanner;
public class Puzzle {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] arg)
	{
		int n = sc.nextInt();
		int arr[] = new int[n];
		for(int i=0;i<n;++i)
		{
			arr[i] = sc.nextInt();
		}
		int loop=0;
		while(arr[0]!=0 || loop<1050)
		{
			for(int i=0;i<n;++i)
			{
				if(i%2==0)
				{
					arr[i]++;
					if(arr[i]==n)
					{
						arr[i]%=n;
					}
				}
				else
				{
					if(arr[i]==0)
					{
						arr[i]=n-1;
					}
					else
					{
						arr[i]--;
					}
				}
			}
			loop++;
		}
		int i;
		for(i=0;i<n;++i)
		{
			if(arr[i]!=i)
			{
				break;
			}
		}
		if(i!=n)
		{
			System.out.print("NO");
		}
		else
		{
			System.out.println("YES");
		}
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;

public class Code47
{
	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}
		public int compareTo(pair o) {
			return x.compareTo(o.x);
		}
	}

	public static void main(String[] args)
	{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int n = in.nextInt();
		int[] a = in.nextIntArray(n);
		boolean flag = false;
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n;j++)
			{
				if(j%2==0)
					a[j] = (a[j]+1)%n;
				else
					a[j] = (a[j]-1+n)%n;
			}

			boolean indicator = true;

			for(int j=1;j<n;j++)
			{
				if(a[j]<a[j-1])
				{
					indicator = false;
					break;
				}
			}
			if(indicator == true)
				flag = true;
			else
				flag = false;

			if(flag == true)
				break;
		}
		if(flag == true)
			pw.println("Yes");
		else
			pw.println("No");

		pw.flush();
		pw.close();
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;

public class Code47
{
	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}
		public int compareTo(pair o) {
			return x.compareTo(o.x);
		}
	}

	public static void main(String[] args)
	{
		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int n = in.nextInt();
		int[] a = in.nextIntArray(n);
		boolean flag = false;
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n;j++)
			{
				if(j%2==0)
					a[j] = (a[j]+1)%n;
				else
					a[j] = (a[j]-1+n)%n;
			}

			boolean indicator = true;

			for(int j=1;j<n;j++)
			{
				if(a[j]<=a[j-1])
				{
					indicator = false;
					break;
				}
			}
			if(indicator == true)
				flag = true;
			else
				flag = false;

			if(flag == true)
				break;
		}
		if(flag == true)
			pw.println("Yes");
		else
			pw.println("No");

		pw.flush();
		pw.close();
	}
}


import java.io.*;
import java.util.*;

public class Solution{

 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

     int n,i,residue;
     boolean work=true;

     n=in.nextInt();
     residue=(in.nextInt()+n)%n;

     for(i=1;i<n;i++){
    	 int temp=in.nextInt();
    	 if(i%2==0){
    		 temp=(temp-i+n)%n;
    		 if(temp!=residue){
    			 work=false;
    			 break;
    		 }
    	 }
    	 else{
    		 temp=(i-temp+n)%n;
    		 if(temp!=residue){
    			 work=false;
    			 break;
    		 }
    	 }
     }

     if(work){
    	 System.out.println("YES");
     }
     else{
    	 System.out.println("NO");
     }

 }
}


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main implements Runnable{

		 public static void main(String[] args) throws IOException {
			new Thread(null , new Main(),"Main", 1<<26).start();

		 }

		public void run(){
			try {
			PrintWriter out = new PrintWriter(System.out);
			MyScanner sc = new MyScanner();
			solve(out, sc);
			out.close();
			}
			catch (Exception e) {
				e.printStackTrace();

			}
		}
		void solve(PrintWriter out, MyScanner sc) {

				int n = sc.nextInt();
				int[] a = new int[n];
				for(int i = 0;  i < n ; ++i) {
					a[i] = sc.nextInt();
				}
				int direction = 1;
				int nbr = n - a[0];
				int i = 0;
				for(;i < n ;++i) {
					if(direction == 1) {
						if(( a[i] + nbr) % n != i) break;
						direction = -1;
					}else {
						if((a[i] - nbr + n) % n != i) break;
						direction = 1;
					}
				}
				if(i == n) out.print("Yes");
				else out.println("No");

		}

static class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    public MyScanner() {
       br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine(){
        String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
    }

 }
 //--------------------------------------------------------
}


import java.util.*;

public class CaseFakeNumber {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] arr = new int[n];
		for(int i = 0; i < n; i++) arr[i] = scan.nextInt();
		boolean ok = false;
		for(int f = 0; f <= 5; f++){
			ok |= check(arr, n);
			for(int i = 0; i < n; i++){
				if(i % 2 == 0){
					arr[i] = nextcw(arr[i], n);
				}
				else{
					arr[i] = nextccw(arr[i], n);
				}
			}
		}
		if(ok){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}

	static int nextccw(int x, int n){
		return (x+n-1)%n;
	}

	static int nextcw(int x, int n){
		return (x+1)%n;
	}

	static boolean check(int[] arr, int n){
		int[] s = new int[n];
		for(int i = 0; i < n; i++) s[i] = i;
		for(int i = 0; i < n; i++){
			if(arr[i] != s[i]) return false;
		}
		return true;
	}
}


import java.util.*;

public class CaseFakeNumber {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] arr = new int[n];
		for(int i = 0; i < n; i++) arr[i] = scan.nextInt();
		boolean ok = false;
		for(int f = 0; f <= n; f++){
			ok |= check(arr, n);
			for(int i = 0; i < n; i++){
				if(i % 2 == 0){
					arr[i] = nextcw(arr[i], n);
				}
				else{
					arr[i] = nextccw(arr[i], n);
				}
			}
		}
		if(ok){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}

	static int nextccw(int x, int n){
		return (x+n-1)%n;
	}

	static int nextcw(int x, int n){
		return (x+1)%n;
	}

	static boolean check(int[] arr, int n){
		int[] s = new int[n];
		for(int i = 0; i < n; i++) s[i] = i;
		for(int i = 0; i < n; i++){
			if(arr[i] != s[i]) return false;
		}
		return true;
	}
}


import java.util.*;

public class CaseFakeNumber {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] arr = new int[n];
		for(int i = 0; i < n; i++) arr[i] = scan.nextInt();
		boolean ok = false;
		for(int f = 0; f <= 1000; f++){
			ok |= check(arr, n);
			for(int i = 0; i < n; i++){
				if(i % 2 == 0){
					arr[i] = nextcw(arr[i], n);
				}
				else{
					arr[i] = nextccw(arr[i], n);
				}
			}
		}
		if(ok){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}

	static int nextccw(int x, int n){
		return (x+n-1)%n;
	}

	static int nextcw(int x, int n){
		return (x+1)%n;
	}

	static boolean check(int[] arr, int n){
		int[] s = new int[n];
		for(int i = 0; i < n; i++) s[i] = i;
		for(int i = 0; i < n; i++){
			if(arr[i] != s[i]) return false;
		}
		return true;
	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class NewClass {

    static final int INF = Integer.MAX_VALUE;

    static void mergeSort(int[] a, int p, int r) {
        if (p < r) {
            int q = (p + r) / 2;
            mergeSort(a, p, q);
            mergeSort(a, q + 1, r);
            merge(a, p, q, r);
        }
    }

    static void merge(int[] a, int p, int q, int r) {
        int n1 = q - p + 1;
        int n2 = r - q;
        int[] L = new int[n1 + 1], R = new int[n2 + 1];

        for (int i = 0; i < n1; i++) {
            L[i] = a[p + i];
        }
        for (int i = 0; i < n2; i++) {
            R[i] = a[q + 1 + i];
        }
        L[n1] = R[n2] = INF;

        for (int k = p, i = 0, j = 0; k <= r; k++) {
            if (L[i] <= R[j]) {
                a[k] = L[i++];
            } else {
                a[k] = R[j++];
            }
        }
    }

    public static boolean sieve(int n) {
        int a[] = new int[n + 1];
        for (int i = 2; i <= n; i++) {
            a[i] = 1;
        }
        for (int i = 2; i <= Math.sqrt(n); i++) {
            if (a[i] == 1) {
                for (int k = 2; i * k <= n; k++) {
                    a[i * k] = 0;
                }
            }
        }
        return a[n] == 1;
    }
public static long sum(int a){
    long su=0;
    while (a>0) {
        su+=a%10;
        a/=10;
    }
    return su;
}
    public static boolean prime(int n) {
        for (int i = 2; i <= Math.sqrt(n); i++) {
            if (n%i==0) {
                return true;
            }
        }
        return false;
    }

    public static String reve(int a, int b, String s) {
        String q = "";
        for (int i = b; i >= a; i--) {
            q += s.charAt(i);
        }
        return q;
    }
    public static boolean isvowel(char c){
        if (c=='a' ||c=='e'||c=='i'||c=='o'||c=='u'||c=='y') {
            return true;
        }
        else return false;
    }
    public static void main(String[] args) throws IOException {
        InputReader in = new InputReader(System.in);
        OutputWriter or = new OutputWriter(System.out);
        int n= in.nextInt();
        int [] a= new int[n];
        for(int i=0;i<n;i++)a[i]=in.nextInt();
        boolean clock = true;
        while (a[0]!=0) {
            for (int i = 0; i < n; i++) {
                if (clock) {
                    if (a[i]==n-1) {
                        a[i]=0;
                    }
                    else a[i]++;
                    clock=false;
                }
                else{

                    if (a[i]==0) {
                        a[i]=n-1;
                    }
                    else a[i]--;
                    clock=true;
                }
            }
            clock=true;
        }
        boolean st=true;
        for (int i = 0; i < n; i++) {
            if (a[i]!=i) {
                st=false;
                break;
            }
        }
        or.print(st?"YES":"NO");
        or.flush();
    }
}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (snumChars == -1) {
            throw new InputMismatchException();
        }
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0) {
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

class OutputWriter {

    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0) {
                writer.print(' ');
            }
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class CaseOfFakeNumbers implements Closeable {

    private InputReader in = new InputReader(System.in);
    private PrintWriter out = new PrintWriter(System.out);

    public void solve() {
        int n = in.ni();
        int[] x = new int[n];
        for (int i = 0; i < n; i++) x[i] = in.ni();
        boolean ok = false;
        int idx = 0;
        do {
            boolean stop = true;
            for (int i = 0; i < n; i++) {
                if (x[i] != i) {
                    stop = false;
                    break;
                }
            }
            if (!stop) {
                for (int i = 0; i < n; i++) {
                    if (i % 2 == 0) {
                        x[i] = (x[i] + 1) % n;
                    } else {
                        x[i]--;
                        if (x[i] < 0) x[i] = n - 1;
                    }
                }
            } else {
                ok = true;
                break;
            }
        } while (++idx < 1000);
        out.println(ok ? "Yes" : "No");
    }

    @Override
    public void close() throws IOException {
        in.close();
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public void close() throws IOException {
            reader.close();
        }
    }

    public static void main(String[] args) throws IOException {
        try (CaseOfFakeNumbers instance = new CaseOfFakeNumbers()) {
            instance.solve();
        }
    }
}


/**
 *   Author: Ridam Nagar
 *   Date: 27 February 2019
 *   Time: 01:17:36
**/
/*
package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{

    public static void main (String[] args) throws java.lang.Exception
    {

    	Scanner sc=new Scanner(System.in);
           int n=sc.nextInt();
           int arr[]=new int[n];
           for(int i=0;i<n;i++){
                arr[i]=sc.nextInt();
           }
           int j=0;
           while(arr[0]!=0){

                for(int i=0;i<n;i+=2){
                     arr[i]=arr[i]+1;
                     if(arr[i]==n){
                      arr[i]=0;
                     }
                }
                for(int i=1;i<n;i+=2){
                  arr[i]=arr[i]-1;
                    if(arr[i]==-1){
                      arr[i]=n-1;
                    }
                }

           }
            int count=0;
           for(int i=0;i<n-1;i++){
                if(arr[i+1]>arr[i]){
                  count++;
                }
           }
           if(count==n-1){
            System.out.println("Yes");
           }else{
            System.out.println("No");
           }

}

}


import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[1005];
        for(int i = 0;i < n;i++) {
            a[i] = sc.nextInt();
        }
        boolean tag = true;
        for(int i = 1;i <= 1000;i++) {
            tag = true;
            for(int j = 0;j < n;j++) {
                if(a[j] != j)
                    tag = false;
                if(j % 2 == 0) {
                    a[j] = (a[j] + 1) % n;
                } else {
                    a[j] = (a[j] - 1 + n) % n;
                }
            }
            if(tag == true) {
                System.out.println("Yes");
                break;
            }
        }
        if(tag == false) {
            System.out.println("No");
        }
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    static int n;
    static int [] arr;

    public static void main(String [] args) {
        init();

        n = sc.nextInt();
        arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        int counter = 0;
        // counter mod 2 = 0 ?? ???????
        // counter mod 2 = 1 ??????

        while (true) {
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    arr[i]++;
                    if (arr[i] == n) arr[i] = 0;
                } else {
                    arr[i]--;
                    if (arr[i] == -1) arr[i] = n - 1;
                }
            }
            if (isOk(arr)) {
                System.out.println("Yes");
                System.exit(0);
            }

            if (counter >= n*n + 100) break;
            counter++;
        }

        System.out.println("No");
    }

    public static boolean isOk(int [] arr) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != i) return false;
        }
        return true;
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    public static void main(String [] args) {
        init();
        int n = sc.nextInt();
        int [] arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        int counter = 0;
        // counter mod 2 = 0 ?? ???????
        // counter mod 2 = 1 ??????

        while (true) {
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    arr[i]++;
                    if (arr[i] == n) arr[i] = 0;
                } else {
                    arr[i]--;
                    if (arr[i] == -1) arr[i] = n - 1;
                }
            }
            if (isOk(arr)) {
                System.out.println("Yes");
                System.exit(0);
            }

            if (counter >= n + 100) break;
            counter++;
        }

        System.out.println("No");
    }

    public static boolean isOk(int [] arr) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != i) return false;
        }
        return true;
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    public static void main(String [] args) {
        init();
        int n = sc.nextInt();
        int [] arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        for (int i = 0; i <= n; i++) {
            boolean ok = true;
            for (int j = 0; j < n; j++) {
                if (arr[i] != i) ok = false;
            }
            if (ok) {
                System.out.print("YES");
                return;
            }

            for (int j = 0; j < n; j++) {
                if ((j & 1) == 0) arr[j] = (arr[j] + 1) % n;
                else arr[i] = (n + arr[i] - 1) % n;
            }
        }
        System.out.print("NO");
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    static int n;
    static int k;
    static int [] arr;
    static int [] indexs;

    public static void main(String [] args) {
        n = sc.nextInt();
        arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        for (int i = 0; i <= n; i++) {
            boolean ok = true;
            for (int j = 0; j < n; j++) {
                if (arr[i] != i) ok = false;
            }
            if (ok) {
                System.out.print("YES");
                return;
            }

            for (int j = 0; j < n; j++) {
                if ((k & 1) == 0) arr[j] = (arr[j] + 1) % n;
                else arr[i] = (n + arr[i] - 1) % n;
            }
        }
        System.out.print("NO");
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    public static void main(String [] args) {
        init();
        int n = sc.nextInt();
        int [] arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        for (int i = 0; i <= n; i++) {
            boolean ok = true;
            for (int j = 0; j < n; j++) {
                if (arr[j] != j) ok = false;
            }
            if (ok) {
                System.out.print("YES");
                return;
            }

            for (int j = 0; j < n; j++) {
                if ((j & 1) == 0) arr[j] = (arr[j] + 1) % n;
                else arr[j] = (n + arr[j] - 1) % n;
            }
        }
        System.out.print("NO");
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Rustam on 6/1/2015.
 */
public class Main {

    static FastScanner sc = null;

    public static void init() {
        sc = new FastScanner(System.in);
    }

    static int n;
    static int k;
    static int [] arr;
    static int [] indexs;

    public static void main(String [] args) {
        n = sc.nextInt();
        arr = new int[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        int counter = 0;
        // counter mod 2 = 0 ?? ???????
        // counter mod 2 = 1 ??????

        while (true) {
            for (int i = 0; i < n; i++) {
                if (i % 2 == 0) {
                    arr[i]++;
                    if (arr[i] == n) arr[i] = 0;
                } else {
                    arr[i]--;
                    if (arr[i] == -1) arr[i] = n - 1;
                }
            }
            if (isOk(arr)) {
                System.out.println("Yes");
                System.exit(0);
            }

            if (counter >= n + 100) break;
            counter++;
        }

        System.out.println("No");
    }

    public static boolean isOk(int [] arr) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != i) return false;
        }
        return true;
    }

}

class FastScanner {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public FastScanner(InputStream inputStream) {
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = null;
            try {
                line = reader.readLine();
            } catch (IOException e) {
            }
            if (line == null)
                return null;
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.util.*;
    import java.io.*;

    public class Codeforces {

        public static void main(String[] args) throws IOException {
            Reader.init(System.in);
            int n = Reader.nextInt();
            int arr[] = new int[n], dis[] = new int[n];

            for(int i = 0; i < n; i++){
                arr[i] = Reader.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(i % 2 == 0){
                    if(arr[i] > i)
                        dis[i] = n - arr[i] - i;
                    else
                        dis[i] = i - arr[i];
                }

                else{
                    if(arr[i] < i)
                        dis[i] = arr[i] + (n-i);
                    else
                        dis[i] = arr[i] - i;
                }
            }

            for(int i = 0; i < n; i++){
                for(int j = 0; j < n; j++){
                    if(dis[i] == dis[j])
                        continue;

                    int x = Math.abs(dis[i] - dis[j]);

                    if(x % n != 0){
                        System.out.println("No");
                        return;
                    }
                }
            }
            System.out.println("Yes");

        }

    }

    class Reader {

        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static byte nextByte() throws IOException {

            return Byte.parseByte(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }


import java.util.*;
    import java.io.*;

    public class Codeforces {

        public static void main(String[] args) throws IOException {
            Reader.init(System.in);
            int n = Reader.nextInt();
            int arr[] = new int[n], dis[] = new int[n];

            for(int i = 0; i < n; i++){
                arr[i] = Reader.nextInt();
            }

            for(int i = 0; i < n; i++){
                if(i % 2 == 0){
                    if(arr[i] > i)
                        dis[i] = n - arr[i] + i;
                    else
                        dis[i] = i - arr[i];
                }

                else{
                    if(arr[i] < i)
                        dis[i] = arr[i] + (n-i);
                    else
                        dis[i] = arr[i] - i;
                }
            }

            for(int i = 0; i < n; i++){
                for(int j = 0; j < n; j++){
                    if(dis[i] == dis[j])
                        continue;

                    int x = Math.abs(dis[i] - dis[j]);

                    if(x % n != 0){
                        System.out.println("No");
                        return;
                    }
                }
            }
            System.out.println("Yes");

        }

    }

    class Reader {

        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static byte nextByte() throws IOException {

            return Byte.parseByte(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }


import java.util.Scanner;
public class B_2 {
    public static void main(String args[])
    {
        Scanner input=new Scanner(System.in);
        int n=input.nextInt();
        int a[]=new int[n];
        for(int i=0;i<n;i++)
        {
            a[i]=input.nextInt();
        }
        int temp=0,ans=0;
        boolean check=false;
        for(int i=0;i<n;i++)
        {
            if(i%2==0)
            {
                if(a[i]<i)
                {
                    ans=i-a[i];
                    //System.out.println("here1"+ans);
                }

                else
                {
                    ans=n-a[i]+i;
                    //System.out.println("here2"+ans);
                }
            }
            else
            {
                if(a[i]>i)
                {
                    ans=a[i]-i;
                    //System.out.println("here3"+ans);
                }

                else
                {
                    ans=n+a[i]-i;
                    //System.out.println("here4"+ans);
                }
            }

            if(!check)
            {
                temp=ans;
                check=true;
            }
            else
            {
                //System.out.println(ans);
                //System.out.println("temp"+temp);
                if(temp!=ans)
                {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");

    }

}