stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <algorithm>

#include <vector>

#include <iostream>

using namespace std;



const int kMaxN = 105;



int n;

int a[kMaxN], b[kMaxN], c[kMaxN], d[kMaxN];

vector<int> g[kMaxN];

int vis[kMaxN], tim, lk[kMaxN];



inline void Link(int u, int v) {

  g[u].push_back(v);

}



int Find(int x) {

  for (int nxt : g[x]) {

    if (vis[nxt] != tim) {

      vis[nxt] = tim;

      if (!lk[nxt] || Find(lk[nxt])) {

        lk[nxt] = x;

        return true;

      }

    }

  }

  return false;

}



int main() {

  ios::sync_with_stdio(false);

  cin >> n;

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

    cin >> a[i] >> b[i];

  }

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

    cin >> c[i] >> d[i];

  }

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

    for (int j = 1; j <= n; ++j) {

      if (a[i] < c[j] && b[i] < d[j])

        Link(i, j);

    }

  }

  int ans = 0;

  tim = 0;

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

    ++tim;

    ans += Find(i);

  }

  cout << ans << endl;

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.300357058118877x):
#include<cstdio>

#include<cstring>



const int N=100,inf=0x5FFFFFFF;

struct node

{

	int x,y;

}R[N+5],B[N+5];

int n,ans;

bool vis[N+5];

int Ma[N+5][N+5],fa[N+5];



int Dfs(int u)

{

	for(int v=1;v<=n;v++)

		if(Ma[u][v]&&!vis[v])

		{

			vis[v]=1;

			if(fa[v]==-1||Dfs(fa[v]))

			{

				fa[v]=u;

				return true;

			}

		}

	return false;

}



void Solve()

{

	memset(fa,-1,sizeof(fa));

	for(int i=1;i<=n;i++)

	{

		memset(vis,0,sizeof(vis));

		ans+=Dfs(i);

	}

}



int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

		scanf("%d %d",&R[i].x,&R[i].y);

	for(int i=1;i<=n;i++)

	{

		scanf("%d %d",&B[i].x,&B[i].y);

		for(int j=1;j<=n;j++)

			if(R[j].x<B[i].x&&R[j].y<B[i].y)

				Ma[j][i]=1;

	}

	Solve();

	printf("%d\n",ans);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string>

#include <cstring>

#include <math.h>

#include <algorithm>

#include <iomanip> 

#include <stack>

#include <stdlib.h>	

#include <stdio.h>

#define INF 0x3f3f3f3f

#include <set> 

#include <map>  

#include <queue>

#define maxn 300

using namespace std;

typedef long long ll;

struct node {

	int x,y;

}a[205],b[160];

int girl[160],line[160][160];

bool used[160];

int n,x,y;



bool found(int x){

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

		if(line[x][i]&&!used[i]){

			used[i]=1;

			if((girl[i]==0)||found(girl[i])){

				girl[i]=x;

				return 1;

			}

		}

	}

	return 0;

}

int main(){

	scanf("%d",&n);

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

		scanf("%d%d",&x,&y);

		a[i].x=x;

		a[i].y=y;

	}

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

		scanf("%d%d",&x,&y);

		b[i].x=x;

		b[i].y=y;

	}

	memset(line,0,sizeof(line));

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

		for(int j=1;j<=n;j++){

			if((a[i].x<b[j].x)&&(a[i].y<b[j].y)){

				line[i][j]=1;

			}

		}

	}

	memset(girl,0,sizeof(girl));

	int sum=0;

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

		memset(used,0,sizeof(used));

		if(found(i)) sum++;

	}

	printf("%d\n",sum);

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.656950769960822x):
#include<cstdio>

#include<cstring>



const int N=100,inf=0x5FFFFFFF;

struct node

{

	int x,y;

}R[N+5],B[N+5];

int n,ans;

bool vis[N+5];

int Ma[N+5][N+5],fa[N+5];



int Dfs(int u)

{

	for(int v=1;v<=n;v++)

		if(Ma[u][v]&&!vis[v])

		{

			vis[v]=1;

			if(fa[v]==-1||Dfs(fa[v]))

			{

				fa[v]=u;

				return true;

			}

		}

	return false;

}



void Solve()

{

	memset(fa,-1,sizeof(fa));

	for(int i=1;i<=n;i++)

	{

		memset(vis,0,sizeof(vis));

		ans+=Dfs(i);

	}

}



int main()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

		scanf("%d %d",&R[i].x,&R[i].y);

	for(int i=1;i<=n;i++)

	{

		scanf("%d %d",&B[i].x,&B[i].y);

		for(int j=1;j<=n;j++)

			if(R[j].x<B[i].x&&R[j].y<B[i].y)

				Ma[j][i]=1;

	}

	Solve();

	printf("%d\n",ans);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int n,a[200],b[200],c[200],d[200];

struct edge

{

	int v,cap,rev;

	edge(int a,int b,int c):v(a),cap(b),rev(c){}

};

vector<edge> w[23333];

void add_edge(int u,int v,int cap)

{

	w[u].push_back(edge(v,cap,w[v].size()));

	w[v].push_back(edge(u,0,w[u].size()-1));

}

const int oo=1<<29;

int level[23333],iter[23333];

int dfs(int s,int t,int f)

{

	if(s==t)return f;

	for(int &i=iter[s];i<w[s].size();i++)

	{

		edge &e=w[s][i];

		if(e.cap&&level[e.v]>level[s])

			if(int d=dfs(e.v,t,min(f,e.cap)))

			{

				e.cap-=d;

				w[e.v][e.rev].cap+=d;

				return d;

			}

	}

	return 0;

}

int max_flow(int s,int t)

{

	int ans=0;

	for(;;)

	{

		memset(level,-1,sizeof level);

		memset(iter,0,sizeof iter);

		level[s]=0;

		queue<int> q;

		q.push(s);

		while(!q.empty())

		{

			int u=q.front();q.pop();

			for(int e=0;e<w[u].size();e++)

			{

				edge &i=w[u][e];

				if(level[i.v]==-1&&i.cap)

				{

					level[i.v]=level[u]+1;

					q.push(i.v);

				}

			}

		}

		if(level[t]==-1)return ans;

		while(int f=dfs(s,t,oo))ans+=f;

	}

}

int main()

{

	cin>>n;

	for(int i=1;i<=n;i++)cin>>a[i]>>b[i];

	for(int i=1;i<=n;i++)cin>>c[i]>>d[i];

	for(int i=1;i<=n;i++)add_edge(0,i,1),add_edge(n+i,2*n+1,1);

	for(int i=1;i<=n;i++)

		for(int j=1;j<=n;j++)

		if(a[i]<c[j]&&b[i]<d[j])add_edge(i,n+j,1);

	cout<<max_flow(0,2*n+1)<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.791759483590115x):
#include<bits/stdc++.h>

using namespace std;

struct point

{

	int x,y,c;

	operator int()const{return x;}

}p[1000];

int n;

int main()

{

	cin>>n;

	for(int i=1;i<=2*n;i++)cin>>p[i].x>>p[i].y,p[i].c=i>n;

	sort(p+1,p+1+n+n);

	set<int> s;

	int ans=0;

	for(int i=1;i<=2*n;i++)

		if(p[i].c&&!(s.empty()||*s.begin()>p[i].y))s.erase(--s.lower_bound(p[i].y)),ans++;

		else if(!p[i].c)s.insert(p[i].y);

	cout<<ans<<endl;

}
// Slower C++ solution:
#include<cstdio>

#include<vector>

#include<algorithm>

#include<cstring>

using namespace std;

vector<int>g[205];

int m,n,ans,mat[205];

bool vis[205];

struct mzls

{

	int x,y;

}a[205],b;

inline bool dfs(int x)

{

	for(int i=0;i<g[x].size();i++)

	{

		int v=g[x][i];

		if(vis[v])

			continue;

		vis[v]=1;

		if(!mat[v]||dfs(mat[v]))

		{

			mat[v]=x;

			return 1;

		}

	}

	return 0;

}

int main()

{

	scanf("%d",&n);

	for(int i=1;i<=2*n;i++)

		scanf("%d%d",&a[i].x,&a[i].y);

	for(int i=1;i<=n;i++)

		for(int j=n+1;j<=2*n;j++)

			if(a[i].x<a[j].x&&a[i].y<a[j].y)

			{

				g[i].push_back(j);

				g[j].push_back(i);

			}

	for(int i=1;i<=n;i++)

	{

		memset(vis,0,sizeof(vis));

		ans+=dfs(i);

	}

	printf("%d",ans);

}

// Faster C++ solution for the same problem (measured speedup: 4.880664788830756x):
#include<cstdio>

#include<cstring>

#define N 105

using namespace std;

int n,o_t[N];

int ans;

bool line[N][N],f[N];

struct node

{

	int x;int y;

}red[N];



struct node blue[N]; 



void read()

{

	scanf("%d",&n);

	for(int i=1;i<=n;i++)

		scanf("%d %d",&red[i].x,&red[i].y);

	for(int i=1;i<=n;i++)

		scanf("%d %d",&blue[i].x,&blue[i].y);

}

int PD(int x)

{

	for(int j=1;j<=n;j++)

	{

		if(line[x][j]&&!f[j])

		{

			f[j]=1;

			if(o_t[j]==0||PD(o_t[j]))

			{

				o_t[j]=x;

				return 1;

			}

		}

	}

	return 0;

}

int main()

{

	read();

	for(int i=1;i<=n;i++)

		for(int j=1;j<=n;j++)

		{

			if(red[i].x<blue[j].x&&red[i].y<blue[j].y)

			line[i][j]=1;

		}

	for(int i=1;i<=n;i++)

	{

		memset(f,0,sizeof f);

		if(PD(i)) ans++;

	}

	printf("%d",ans);

 }
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

ll f ( ll x ) {

    if ( x == 0 ) return 0;

    else return x % 10 + f ( x / 10 );

}

int main() {

    std::ios::sync_with_stdio ( false );

    int k;

    cin >> k;

    int num = 0;

    ll ans = 1;

    ll p = 1;

    while ( num < k ) {

        cout << ans << endl;

        ll ans1 = ans + p;

        ll ans2 = ans + p * 10;

        if ( ans1 * f ( ans2 ) <= ans2 * f ( ans1 ) ) {

            ans = ans1;

        } else {

            ans = ans2;

            p *= 10;

        }

        num++;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.245496141204407x):
#include<cstdio>

#include<cstring>

#include<algorithm>

typedef long long ll;

typedef long double ld;

ld Max(ld a,ld b){return a>b?a:b;}

inline ll read()

{

	ll x=0,f=1;char c=getchar();

	while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}

	while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}

	return x*f;

}

ll k,a;

ld MAA,uu;

ll rr(ll x)

{

	ll now=0;

	while(x) now+=x%10,x/=10;

	return now;

}

bool check(ll x)

{

	//printf("%lldzx\n",x);

	ll g=1;

	while(g<=x)

	{

		//printf("%lld %lld %lld %lld %lld %lf %lf\n",g,(x+g),rr(x+g),x,rr(g),(double)1.0*(x+g)/rr(x+g),(double)1.0*x/rr(x));

		if((ld)(x+g)*rr(x)<(ld)x*rr(x+g))return 0;

		g=(g<<3)+(g<<1);

	}

	return 1;

}

int main()

{

	//printf("%lf\n",(double)2/1);

	scanf("%lld",&k);

	while(k--)

	{

		ll r=1;

		while(1)

		{

			if(check(r+a))

			{

				a+=r;

				break;

			}

			r=(r<<3)+(r<<1);

		}

		printf("%lld\n",a);

	}

	return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <cstring>

#include <queue>

#include <cmath>

#include <algorithm>

#include <set>

#include <iostream>

#include <map>

#include <stack>

#include <string>

#include <vector>

#define  pi acos(-1.0)

#define  eps 1e-6

#define  fi first

#define  se second

#define  rtl   rt<<1

#define  rtr   rt<<1|1

#define  bug         printf("******\n")

#define  mem(a,b)    memset(a,b,sizeof(a))

#define  name2str(x) #x

#define  fuck(x)     cout<<#x" = "<<x<<endl

#define  f(a)        a*a

#define  sf(n)       scanf("%d", &n)

#define  sff(a,b)    scanf("%d %d", &a, &b)

#define  sfff(a,b,c) scanf("%d %d %d", &a, &b, &c)

#define  sffff(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)

#define  pf          printf

#define  FRE(i,a,b)  for(i = a; i <= b; i++)

#define  FREE(i,a,b) for(i = a; i >= b; i--)

#define  FRL(i,a,b)  for(i = a; i < b; i++)+

#define  FRLL(i,a,b) for(i = a; i > b; i--)

#define  FIN         freopen("data.txt","r",stdin)

#define  gcd(a,b)    __gcd(a,b)

#define  lowbit(x)   x&-x

using namespace std;

typedef long long  LL;

typedef unsigned long long ULL;

const int mod = 1e9 + 7;

const int maxn = 2e5 + 10;

const int INF = 0x3f3f3f3f;

const LL INFLL = 0x3f3f3f3f3f3f3f3fLL;

int k;

LL sum ( LL x ) {

    int ret = 0;

    while ( x ) {

        ret += x % 10;

        x /= 10;

    }

    return ret;

}

int main()  {

    sf ( k );

    LL ans = 1, p = 1;

    while ( k-- ) {

        printf ( "%lld\n", ans );

        LL ans1 = ans + p, ans2 = ans + p * 10;

        if ( ans1 * sum ( ans2 ) <= ans2 * sum ( ans1 ) ) ans = ans1;

        else ans = ans2,p*=10;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.126635101284335x):
#include<cstdio>

#include<cstring>

#include<algorithm>

typedef long long ll;

typedef long double ld;

ld Max(ld a,ld b){return a>b?a:b;}

inline ll read()

{

	ll x=0,f=1;char c=getchar();

	while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}

	while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}

	return x*f;

}

ll k,a;

ld MAA,uu;

ll rr(ll x)

{

	ll now=0;

	while(x) now+=x%10,x/=10;

	return now;

}

bool check(ll x)

{

	//printf("%lldzx\n",x);

	ll g=1;

	while(g<=x)

	{

		//printf("%lld %lld %lld %lld %lld %lf %lf\n",g,(x+g),rr(x+g),x,rr(g),(double)1.0*(x+g)/rr(x+g),(double)1.0*x/rr(x));

		if((ld)(x+g)*rr(x)<(ld)x*rr(x+g))return 0;

		g=(g<<3)+(g<<1);

	}

	return 1;

}

int main()

{

	//printf("%lf\n",(double)2/1);

	scanf("%lld",&k);

	while(k--)

	{

		ll r=1;

		while(1)

		{

			if(check(r+a))

			{

				a+=r;

				break;

			}

			r=(r<<3)+(r<<1);

		}

		printf("%lld\n",a);

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

using namespace std;

double cal(long long x){

    long long y=10,len=1,sum=0,ret=x;

    while(y<=x)y=(y<<1)+(y<<3),++len;

    while(len--){

        y/=10;

        sum+=x/y;

        x%=y;

    }

    return ret*1.0/sum;

}

bool judge(long long x){

    long long a=1;

    while(a<=x){

        if(cal(x+a)<cal(x))return false;

        a=(a<<1)+(a<<3);

    }

    return true;

}

long long k,now;

int main(){

    scanf("%d",&k);

    while(k--){

        long long a=1;

        while(true){

            if(judge(now+a)){

                now+=a;

                break;

            }

            a=(a<<1)+(a<<3);

        }

        cout<<now<<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.183855320504467x):
#include<cstdio>

#include<cstring>

#include<algorithm>

typedef long long ll;

typedef long double ld;

ld Max(ld a,ld b){return a>b?a:b;}

inline ll read()

{

	ll x=0,f=1;char c=getchar();

	while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}

	while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}

	return x*f;

}

ll k,a;

ld MAA,uu;

ll rr(ll x)

{

	ll now=0;

	while(x) now+=x%10,x/=10;

	return now;

}

bool check(ll x)

{

	//printf("%lldzx\n",x);

	ll g=1;

	while(g<=x)

	{

		//printf("%lld %lld %lld %lld %lld %lf %lf\n",g,(x+g),rr(x+g),x,rr(g),(double)1.0*(x+g)/rr(x+g),(double)1.0*x/rr(x));

		if((ld)(x+g)*rr(x)<(ld)x*rr(x+g))return 0;

		g=(g<<3)+(g<<1);

	}

	return 1;

}

int main()

{

	//printf("%lf\n",(double)2/1);

	scanf("%lld",&k);

	while(k--)

	{

		ll r=1;

		while(1)

		{

			if(check(r+a))

			{

				a+=r;

				break;

			}

			r=(r<<3)+(r<<1);

		}

		printf("%lld\n",a);

	}

	return 0;

}
// Slower C++ solution:
#include <algorithm>

#include <cstring>

#include <deque>

#include <functional>

#include <iostream>

#include <map>

#include <numeric>

#include <queue>

#include <set>

#include <vector>

using namespace std;

#define fst first

#define snd second

using ll = long long;

using I = pair<int, int>;

const int D = 16;



ll g(ll n, int k) {

  vector<int> dig(D, 0), sum(D + 1, 0);

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

    dig[i] = n % 10;

    sum[i + 1] = sum[i] + dig[i];

    n /= 10;

  }

  ll m = 0;

  bool eq = true;

  for (int i = D - 1, j = D - 1; i > 0; i--) {

    j = min(i - 1, j);

    while (j >= 0 && dig[j] == 9) --j;

    for (int d = eq ? dig[i] : 0; d <= 9; d++) {

      bool neq = eq & (d == dig[i]);

      int mn = 0, mx = 9 * i;

      if (neq) {

        mn += 9 * (i - j - 1);

        if (j >= 0) {

          mn += sum[j + 1] == dig[j] ? dig[j] : dig[j] + 1;

        }

      }

      if (mn <= k - d && k - d <= mx) {

        m = m * 10 + d;

        k -= d;

        eq = neq;

        break;

      }

    }

  }

  m = m * 10 + k;

  return m;

}



ll f(ll n) {

  ll p = 1, q = 0;

  for (ll k = 1; k <= D * 9; k++) {

    ll m = g(n, k);

    if (p * k > m * q || (p * k == m * q && m < p)) {

      p = m;

      q = k;

    }

  }

  return p;

}



int main() {

  int K;

  while (cin >> K) {

    vector<ll> res;

    res.push_back(1);

    while (res.size() < K) {

      ll n = res.back();

      res.push_back(f(n + 1));

    }

    for (ll x : res) cout << x << endl;

  }

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.5734461277175222x):
#include <algorithm>

#include <cstring>

#include <deque>

#include <functional>

#include <iostream>

#include <map>

#include <numeric>

#include <queue>

#include <set>

#include <vector>

using namespace std;

#define fst first

#define snd second

using ll = long long;

using I = pair<int, int>;

const int D = 16;



int S(ll n) {

  int s = 0;

  while (n > 0) {

    s += n % 10;

    n /= 10;

  }

  return s;

}



ll f(ll n) {

  vector<ll> cand = {n};

  for (ll p = 1; p <= n; p *= 10) {

    int d = (n / p) % 10;

    for (int i = d + 1; i <= 9; i++) {

      ll x = (n / p) - d + i;

      x = x * p + p - 1;

      cand.push_back(x);

    }

  }

  ll p = 1, q = 0;

  for (ll x : cand) {

    ll s = S(x);

    if (p * s > x * q || (p * s == x * q && p > x)) {

      p = x;

      q = s;

    }

  }

  return p;

}



int main() {

  int K;

  while (cin >> K) {

    vector<ll> res;

    res.push_back(1);

    while (res.size() < K) {

      ll n = res.back();

      res.push_back(f(n + 1));

    }

    for (ll x : res) cout << x << endl;

  }

  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std ;

int x ;

int main()

{

	int sum = 0 , y ;

	cin >> x ;

	y= x ;

	while ( y > 0 ) 

		sum += y% 10 , y/=10 ;

	if ( x % sum == 0 ) 

		cout << "Yes" <<"\n" ;

	else

		cout << "No"<< endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.26983051747709x):
#include<stdio.h>



int f(int angka){

	int v=100000000,panjang,total=0;

	

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

		total=total+(angka/v);

		angka=angka%v;

		v/=10;

		

	}

	

	

	return total;

}



int main(){

	int a;

	scanf("%d", &a);

	int b=f(a);

	printf("%s\n", a%b==0?"Yes":"No");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,a,sum=0;

    cin>>n;

    a=n;

    for(int i=n;i>=1;i--)

    {

        sum=sum+n%10;

        n=n/10;



    }

    if(a%sum==0) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316138710033623x):
#include <stdio.h>



int main (){

	int input;

	int temp=0;

	scanf ("%d",&input);

	int cek=input;

	while(input>0){

		temp+=input%10;

		input/=10;

	}

	//printf ("%d",temp);

	if(cek%temp==0){

		printf ("Yes\n");

	}else printf ("No\n");

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    long long value;

    while(cin >> value){

        int divisor = 0;

            int temp = value;

            while(temp!=0){

                divisor += temp%10;

                temp /=10;

            }

            if(value%divisor == 0){

                cout << "Yes" << endl;

            }

            else

                cout << "No" << endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.31483271926165x):
#include <stdio.h>



int main (){

	int input;

	int temp=0;

	scanf ("%d",&input);

	int cek=input;

	while(input>0){

		temp+=input%10;

		input/=10;

	}

	//printf ("%d",temp);

	if(cek%temp==0){

		printf ("Yes\n");

	}else printf ("No\n");

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int n,d,a,sum=0;

    cin>>n;

    a=n;

    while(a>0){

    d=a%10;

    sum=sum+d;

    a=a/10;

    }

    if(n%sum==0)

    printf("Yes\n");

    else

    printf("No\n");

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2494878564495755x):
#include <stdio.h>



int main (){

	int input;

	int temp=0;

	scanf ("%d",&input);

	int cek=input;

	while(input>0){

		temp+=input%10;

		input/=10;

	}

	//printf ("%d",temp);

	if(cek%temp==0){

		printf ("Yes\n");

	}else printf ("No\n");

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

long long n, s, t, a[100005], b[100005];

int main() {

	int i;

	scanf("%lld", &n);

	for(i=1; i<=n; i++) scanf("%lld", &a[i]), b[i]=a[i];

	for(i=1; i<=n; i++) {

		a[i] += a[i-1];

		if(i%2) {

			if(a[i]<=0) s += 1-a[i], a[i]=1;

		} else {

			if(a[i]>=0) s += a[i]+1, a[i]=-1;

		}

	}

	for(i=1; i<=n; i++) {

		b[i] += b[i-1];

		if(i%2) {

			if(b[i]>=0) t += b[i]+1, b[i]=-1;

		} else {

			if(b[i]<=0) t += 1-b[i], b[i]=1;

		}

	}

	printf("%lld", std::min(s,t));

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.169912952600371x):
#include <cstdio>

long long n, s, x, y, a[100005];

int main() {

	int i;

	scanf("%lld", &n);

	for(i=0; i<n; i++) scanf("%lld", &a[i]);

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

		s += a[i];

		if(i%2) {

			if(s<=0) x += 1-s, s=1;

		} else {

			if(s>=0) x += s+1, s=-1;

		}

	}

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

		s += a[i];

		if(i%2) {

			if(s>=0) y += s+1, s=-1;

		} else {

			if(s<=0) y += 1-s, s=1;

		}

	}

	printf("%lld", x<y ? x:y);

	return 0;

}
// Slower C++ solution:
#include "bits/stdc++.h"

using namespace std;

#define ll long long int

#define rep(i,n) for( int i = 0; i < n; i++ )

#define rrep(i,n) for( int i = n; i >= 0; i-- )

#define REP(i,s,t) for( int i = s; i <= t; i++ )

#define RREP(i,s,t) for( int i = s; i >= t; i-- )

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF 2000000000

#define mod 1000000007

#define INF2 1000000000000000000

#define int long long



signed main(void)

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n; cin >> n;

    int a[100010];

    rep(i, n) cin >> a[i + 1];

    int ans[2] = {};

    rep(j, 2) {

        int sum[100010] = {};

        REP(i, 1, n) {

            sum[i] += sum[i - 1] + a[i];

            if (i % 2 == j && sum[i] >= 0) {

                ans[j] += sum[i] + 1;

                sum[i] -= sum[i] + 1;

            } 

            else if(i % 2 == (j + 1) % 2 && sum[i] <= 0) {

                ans[j] += 1 - sum[i];

                sum[i] += 1 - sum[i];

            }

        }

    }

    cout << min(ans[0], ans[1]) << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.8940496269658067x):
#include "bits/stdc++.h"

using namespace std;

#define ll long long int

#define rep(i,n) for( int i = 0; i < n; i++ )

#define rrep(i,n) for( int i = n; i >= 0; i-- )

#define REP(i,s,t) for( int i = s; i <= t; i++ )

#define RREP(i,s,t) for( int i = s; i >= t; i-- )

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF 2000000000

#define mod 1000000007

#define INF2 1000000000000000000





int main(void)

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n; cin >> n;

    int a[100010];

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

        cin >> a[i];

    }

    

    ll ans = INF2;

    for (int k = 0; k < 2; k++) {

        ll tmp = 0;

        ll sum = 0;

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

            sum += a[i];

            if ((k + i) % 2 == 0 && sum <= 0) {

                tmp += abs(1 - sum);

                sum = 1;

                

            } else if ((k + i) % 2 == 1 && sum >= 0) {

                tmp += abs(-1 - sum);

                sum = -1;

            }

            //cout << sum << " " << tmp << endl;

        }

        //cout << endl;

        ans = min(ans, tmp);

    }

    cout << ans << endl;



    return 0;

}
// Slower C++ solution:
#include<stdio.h>

#include<math.h>

bool flag[1000000];

int main(void)

{

	long long i,j,p,n,count;

	p = (long long)sqrt(1000000.0);

	for(i = 3; i <= p; i = i + 2)

	{

		if(flag[i] == false)

		{

			for(j = i * i; j <= 1000000; j = j + 2 * i)

			{

				flag[j] = true;

				

			}

		}

	}

		

	while((scanf("%lld",&n)) != EOF)

	{

		

		if(n == 1 || n == 0)

			count = 0;

		else

		{

			count = 1;

			for(i = 3; i <= n; i = i + 2)

			{

				if(flag[i] == false)

					count++;

			}

		}

		printf("%lld\n",count);

	}

	



		

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4629086795718262x):
#include <iostream>

#include <cstdio>

#include <string>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <vector>

#include <queue>

using namespace std;

#define MAX 1000000

#define LMT 1000

unsigned flag[MAX>>6];

int primes[6000000];//5761455

#define ifc(n) (flag[n>>6]&(1<<((n>>1)&31)))

#define isc(n) (flag[n>>6]|=(1<<((n>>1)&31)))



int sieve()

{

    unsigned i, j, k;

    for(i=3; i<LMT; i+=2)

        if(!ifc(i))

            for(j=i*i, k=i<<1; j<MAX; j+=k)

                isc(j);

    return 0;

}



int main()

{

    sieve();

    unsigned int i,L;

    int k=1, count;

    primes[0]=2;

    while(scanf("%d", &L)==1)

    {

        count=1;

        for( i=3; i<=L; i+=2)

        {

            if(ifc(i)==0)

                count++;

        }

        if(L>1)

            printf("%d\n", count);

        else printf("0\n");

    }

    return 0;

}