#define nl                  "\n"
#define ll                  long long
#define ull                 unsigned long long
#define pb                  push_back
#define SIZE(a)             (int)a.size()
#define SORT(v)             sort(v.begin(),v.end())
#define RSORT(v)            sort(v.rbegin(),v.rend())
#define REV(v)              reverse(v.begin(),v.end())
#define ff                  first
#define ss                  second
#define sq(a)               ((a)*(a))
#define For(i,a,b)          for(i=a;i<=b;i++)
#define Rof(i,a,b)          for(i=a;i>=b;i--)
#define Rep(i,b)            for(i=0;i<b;i++)
#define MOD                 1000000007
#define PI                  acos(-1.0)
#define eps                 1e-9
#define Linf                2e18
#define inf                 1<<30
#define MX5                 100005
#define MX6                 1000006
#define MX3                 1005
#define GCD(a,b)            __gcd(a,b)
#define Abs(a)              abs(a)
#define input(a,b)          scanf("%lld%lld",&a,&b)
#define in1(a)              scanf("%lld",&a)
#define output(a)           printf("%lld\n",a);
#define mem(a)              memset(a,-1,sizeof(a)) // complexity O(n)
#define clr(a)              memset(a,0,sizeof (a))
#define mk                  make_pair
#define pLL                 pair<ll,ll>
#define invcos(a)           (acos(a)*(180/3.14159265))
#define rtan(a)             (tan(a*3.14159265/180.0))
#define pip                 printf("pip")
#define Case(x)             printf("Case %lld: ",x)
#define timelimit           1.0*clock()/CLOCKS_PER_SEC
#define pc_one              __builtin_popcount
#define pcl_one             __builtin_popcountl
#define pcll_one            __builtin_popcountll
#define parity              __builtin_parity
#define parityl             __builtin_parityl
#define parityll            __builtin_parityll
#define infile              freopen("input.txt","r",stdin)
#define outfile             freopen("output.txt","w",stdout)
#define debug(x)            cerr << #x << " is " << x << endl
#define fast                ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
#define minheap             priority_queue<int, vector<int>, greater<int> >
//const ll Linf=2e18;
///4direction ->        int del_x[]={-1,0,1,0},del_y[]={0,1,0,-1};
///8direction ->        int del_x[]={-1,0,1,0,1,-1,-1,1},del_y[]={0,1,0,-1,-1,-1,1,1};

#include <bits/stdc++.h>
/*#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
using namespace std;
/*using namespace __gnu_pbds;

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
*/
ll find_lcm(ll a, ll b) { return ((a * b) / __gcd(a, b));}
ll bigmod(ll n, ll p) {if (p == 0) return 1; if (p == 1)return (n + MOD) % MOD; if (p % 2)return (bigmod(n, p - 1) * n + MOD) % MOD; else {ll x = bigmod(n, p / 2); return (x * x + MOD) % MOD;}}
ll modinverse(ll n) {return bigmod(n, MOD - 2) % MOD;}
bool check_2s_power(ll a) {return (pcll_one(a) == 1 ? true : false);}
ll check_Bit(ll n, ll k) { if (n & (1LL << k)) return true; return false; }
ll setBit(ll n, ll k) { return (n | (1LL << k)); }
ll clearBit(ll n, ll k) { return (n & (~(1LL << k))); }
ll toggleBit(ll n, ll k) { return (n ^ (1LL << k)); }

/*----------------------Graph Moves----------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*------------------------------------------------*/
int main()
{
     ll n,sum=0,i;
     in1(n);
     for(i=1;;i++)
     {
         sum=(i*(i+1))/2;
         if(sum>=n)
         {
             output(i);
             return 0;
         }
     }
}

#include "bits/stdc++.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
using namespace std;

#define ll long long
#define rep(i, b) for (ll i = 0; i < b; i++)
#define fr(i ,a, b) for (ll i = a; i < b; i++)
#define rev(i, b) for (ll i = b-1; i >=0 ; i--)
#define in(a, n) rep(i, n) cin >> a[i];
#define outp(a) cout << a << endl;
#define out(a, n) rep(i, n) cout << a[i] << " ";
#define MIN -1e9
#define MAX 1e9
#define PI acos(-1)
#define inp(a) ll a; cin>>a;
#define endl "\n"
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define vl vector<ll>
#define ff first
#define ss second
#define sz(x) ((ll)(x).size())
#define boo(x) ((x==0)?cout << "NO" << endl; : cout << "YES" << endl;)

typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<vi> vvi;
typedef unsigned long long ull;
typedef long double lld;

//=====================================================================/
//debug zone

// #ifndef ONLINE_JUDGE
// #define debug(x) cerr << #x <<" "; _print(x); cerr << endl;
// #else
// #define debug(x)
// #endif

// void _print(ll t) {cerr << t;}
// void _print(int t) {cerr << t;}
// void _print(string t) {cerr << t;}
// void _print(char t) {cerr << t;}
// void _print(lld t) {cerr << t;}
// void _print(double t) {cerr << t;}
// void _print(ull t) {cerr << t;}

// template <class T, class V> void _print(pair <T, V> p);
// template <class T> void _print(vector <T> v);
// template <class T> void _print(set <T> v);
// template <class T, class V> void _print(map <T, V> v);
// template <class T> void _print(multiset <T> v);
// template <class T, class V> void _print(pair <T, V> p) {cerr << "{"; _print(p.ff); cerr << ","; _print(p.ss); cerr << "}";}
// template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T> void _print(set <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T> void _print(multiset <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
// template <class T, class V> void _print(map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}

//=====================================================================/
//Available Functions :

//1. binpow(binpow)	 2. string to int and int to string (stll)	 3. no of coprime nos before it(coprime)
//=====================================================================/

void solve(){

    double a;
    cin >> a;
    double p=sqrt(a);
    if(a==2||a==1){
        cout << "1" << endl;
        return;
    }
    fr(i,(int)p-1,a){
        if(((i*(i+1))/2)>=a){
            cout << i << endl;
            return;
        }
    }

    return;
}

int main(){

#ifndef ONLINE_JUDGE
    freopen("Error.txt", "w", stderr);
#endif
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    ll tt = 1;
    // cin >> tt;
    while(tt--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rrep(i,n) for (ll i = n - 1; i >= 0;i--)
#define ll long long int
#define INF 1000000007
#define llINF 1000000000000000007
#define v(i) vector<i>
#define vv(i) vector<vector<i>>
// int num = atoi(string.c_str()); 文字列の整数変換
// sort(a,a+n,greater<int>()); 昇順ソート
int digit(ll n){int ans=0;while(n>0){n /= 10; ans++;}return ans;}//桁数
ll _pow(ll a,ll b){ll ans = 1;rep(i,b){ ans = a * ans ;}return ans;}//階乗
ll _modpow(ll a, ll n, ll mod) {ll res = 1;while (n > 0) {if (n & 1){ res = res * a % mod;}a = a * a % mod;n >>= 1;}return res;}
ll gcd(ll a, ll b){if (a%b == 0){return(b);}else{return(gcd(b, a%b));}}//最大公約数
ll lcm(ll a, ll b){return a * b / gcd(a, b);} //最小公倍数
struct UnionFind {
    vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

    UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
        for(int i = 0; i < N; i++) par[i] = i;
    }

    int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
        if (par[x] == x) return x;
        return par[x] = root(par[x]);//経路圧縮
    }

    void unite(int x, int y) { // xをyの木に併合
        int rx = root(x); //xの根をrx
        int ry = root(y); //yの根をry
        if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
        par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
    }

    bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
};
ll cmb(ll n, ll r){ll X = 1;for(int i = n; i >= n - r + 1;i--){X = X * i % INF;}ll Y = 1;for(int i = r;i > 0 ;i--){Y = Y * i % INF;}Y = _modpow(Y,(ll)INF-2,(ll)INF);return X * Y % INF;}

ll g2(ll num){
    v(ll) sel;
    while(num > 0){
        sel.push_back(num%10);
        num /= 10;
    }
    sort(sel.begin(),sel.end(),greater<ll>());
    ll ans = 0 , keta = 1;
    for(auto i : sel){
        ans += i*keta;
        keta *= 10;
    }
    return ans;
}
ll g1(ll num){
    v(ll) sel;
    while(num > 0){
        sel.push_back(num%10);
        num /= 10;
    }
    sort(sel.begin(),sel.end());
    ll ans = 0 , keta = 1;
    for(auto i : sel){
        ans += i*keta;
        keta *= 10;
    }
    return ans;
}

  int main(){
    ll n;cin>>n;
    ll k;cin>>k;
    ll ans = 0;
    ll now = n;
    rep(i,k){
        now = g1(now) - g2(now);
    }
    cout<<now<<endl;
   return 0;
     }

#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
typedef long long ll;
char s1[105],s2[105];
bool cmp(int a,int b)
{
	return a>b;
}
void numTstr(int fl,ll num)
{
	if(fl==1)
	{
		sprintf(s1,"%lld",num);
		int len=strlen(s1);
		sort(s1,s1+len,cmp);
	}
	else if(fl==2)
	{
		sprintf(s2,"%lld",num);
		int len=strlen(s2);
		sort(s2,s2+len);
	}
}
ll strTnum(int fl)
{
	ll ans=0;
	if(fl==1)
	{
	//	ll ans=0;
		for(int i=0;i<strlen(s1);i++)
		{
			ans=ans*10+(s1[i]-'0');
		}
	}
	else if(fl==2)
	{
	   // ll ans=0;
		for(int i=0;i<strlen(s2);i++)
		{
			ans=ans*10+(s2[i]-'0');
		}
	}
	return ans;
}
int main()
{
	ll n,k;
	cin>>n>>k;
	ll tt=n;
	for(int i=1;i<=k;i++)
	{
		numTstr(1,tt);
		numTstr(2,tt);
		if(strcmp(s1,s2)==0)
		{
			cout<<0<<endl;
			return 0;
		}
		tt=strTnum(1)-strTnum(2);

	}
	cout<<tt<<endl;
	return 0;

}


#include <iostream>
#include <vector>
#include <map>

using namespace std;
typedef long long ll;
ll INF = 1000000000000000;
struct segment_tree{
    int n; vector<ll> seg;
    segment_tree(vector<ll> v){
        n = v.size(); seg.resize(2*n);
        for(int i=0;i<n;i++) seg[i + n] = v[i];
        for(int i=n - 1;i>0;i--) seg[i] = seg[i<<1] + seg[i<<1|1];
    }
    void update(int p,ll val){
        for(seg[p += n] += val;p>1;p>>=1) seg[p>>1] = seg[p] + seg[p^1];
    }
    ll query(int l,int r){
        ll res = 0;
        for(l += n,r += n; l<r;l>>=1,r>>=1){
            if(l&1) res += seg[l++];
            if(r&1) res += seg[--r];
        }
        return res;
    }
    void clear(){for(int i=0;i<2*n;i++) seg[i] = 0;}
};

vector<int> zz,a,b;
map<int,int> mp;
ll t[200010],x[200010],y[200010];
int main(){
    ll i,n,m,q; cin >> n >> m >> q;
    mp[0]++;
    vector<int> a(n),b(m);
    for(i=0;i<q;i++){
        cin >> t[i] >> x[i] >> y[i]; x[i]--;
        mp[y[i]]++;
    }
    for(auto x:mp) zz.push_back(x.first);
    for(i=0;i<zz.size();i++) mp[zz[i]] = i;
    vector<ll> v(zz.size());
    segment_tree seg1(v),seg2(v),seg_num1(v),seg_num2(v);
    for(i=0;i<n;i++) seg1.update(mp[a[i]],a[i]),seg_num1.update(mp[a[i]],1);
    for(i=0;i<m;i++) seg2.update(mp[b[i]],b[i]),seg_num2.update(mp[b[i]],1);
    ll ans = 0;
    int k = v.size();
    for(i=0;i<n;i++) ans += seg_num2.query(0,mp[a[i]])*a[i] + seg2.query(mp[a[i]],k);
    for(i=0;i<q;i++){
        if(t[i]==1){
            int j = x[i];
            ans -= seg_num2.query(0,mp[a[j]])*a[j] + seg2.query(mp[a[j]],k);
            seg1.update(mp[a[j]],-a[j]); seg_num1.update(mp[a[j]],-1);
            a[j] = y[i];
            seg1.update(mp[a[j]],a[j]); seg_num1.update(mp[a[j]],1);
            ans += seg_num2.query(0,mp[a[j]])*a[j] + seg2.query(mp[a[j]],k);
        }
        if(t[i]==2){
            int j = x[i];
            ans -= seg_num1.query(0,mp[b[j]])*b[j] + seg1.query(mp[b[j]],k);
            seg2.update(mp[b[j]],-b[j]); seg_num2.update(mp[b[j]],-1);
            b[j] = y[i];
            seg2.update(mp[b[j]],b[j]); seg_num2.update(mp[b[j]],1);
            ans += seg_num1.query(0,mp[b[j]])*b[j] + seg1.query(mp[b[j]],k);
        }
        cout << ans << endl;
    }
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define pb push_back

int pw(int c)
{
    int res = 1;
    if (c == 0)
        return 1;
    while (c-- > 0)
        res *= 10;
    return res;
}

int sc(vector<int> &st, int last)
{
    int res = 0;
    st[last]++;
    for (int i = 1; i < 10; i++)
        res += i * pw(st[i]);
    st[last]--;
    return res;
}

double solve()
{
    int k;
    string s, t;
    cin >> k >> s >> t;
    vector<int> cnt(10, k), bag(10, k), st1(10), st2(10);
    for (int i = 0; i < 4; i++)
    {
        cnt[s[i] - '0']--;
        cnt[t[i] - '0']--;
        st1[s[i] - '0']++;
        st2[t[i] - '0']++;
    }
    for (int i = 1; i <= 9; i++)
        bag[i] = cnt[i];
    ll w1 = 0, w2 = 0;
    for (int i = 1; i <= 9; i++)
    {
        if (cnt[i] == 0)
            continue;
        ll w = cnt[i];
        cnt[i]--;
        for (int j = 1; j <= 9; j++)
        {
            if (cnt[j] == 0)
                continue;
            if (sc(st1, i) > sc(st2, j))
                w1 += w * 1ll * cnt[j];
            else
                w2 += w * 1ll * cnt[j];
        }
        cnt[i]++;
    }
    return w1 * 1.0 / (w1 + w2) * 1.0;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << setprecision(18) << fixed << solve() << "\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<vector<ll> > vv64;
typedef vector<vector<p64> > vvp64;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
#define fi(i,a,b) for(ll i = (a); i < (b); i++)
#define fr(i,a,b) for(ll i = (a); i >=(b); i--)
#define dbg(x) cout<<#x<<" = "<<x<<endl
#define mp make_pair
#define pb push_back
#define inf 2e15
#define inp(arr,z) for(int i=0; i<z; i++)cin>>arr[i]
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
void solve();
int main(){
fast_cin();
chrono::high_resolution_clock::time_point t1 = chrono::high_resolution_clock::now();
#ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
////freopen("output.txt", "w", stdout);
#endif
ll t=1;
// cin >> t;
while (t--)
{solve();cout<<endl;}
chrono::high_resolution_clock::time_point t2 = chrono::high_resolution_clock::now();
chrono::duration<double, std::milli> time_span = t2 - t1;
//cout<<time_span.count();
return 0;
}
ll power(ll a , ll b ){ll r=1;ll o=a;if(b<=0)return 1;
     while(b!=0){if(b%2)r*=o,b--; else {b/=2; o=o*o;}}
   return r;}

void solve(){

string s; cin>>s;
reverse(all(s));
fi(i,0,s.size()){if(s[i]=='9')s[i]='6';else if(s[i]=='6')s[i]='9';}
cout<<s;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	string s;
	cin>>s;
	int n=s.size();
	for(int i=0;i<n;i++){

	    if(i<(n/2)){
	        char temp =s[i];
	        s[i]=s[n-1-i];
	        s[n-1-i]=temp;
	    }

	    if(s[i]=='6'){
	        s[i]='9';
	    }
	    else if(s[i]=='9'){
	        s[i]='6';
	    }

	    cout<<s[i];
	}
	return 0;
}


/*************************************Ninja-nick-s*****************************************/

#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;typedef long double ld;typedef pair<int,int> pii;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define YES {cout<<"YES\n";return;}
#define NO {cout<<"NO\n";return;}
#define all(x) x.begin(), x.end()
#define rep(i,start,end) for(auto i=(start)-((start)>(end));i!=(end)-((start)>(end));((start)<(end)?i++:i--))
const ll mod = 1e9+7, N = 2e6+7, M = 2e6+7, INF = INT_MAX/10;
ll powe(ll x, ll y){ x = x%mod, y=y%(mod-1);
ll ans = 1;
while(y>0){if (y&1){ans = (1ll * x * ans)%mod;}y>>=1;x = (1ll * x * x)%mod;}
return ans;}

void PA(int v[], int n, int x = 0) { for (int i = x ; i < n + x; i++)cout << v[i] <<" "  ;}
void IA(int a[], int n, int x = 0) {for (int i = x; i < n + x; i++)cin >> a[i];}
string yup="YES";
string nope="NO";

/* CHECK t */
void Solve(){
    int a,b,c;cin>>a>>b>>c;
    // int a[n];IA(a,n);
    if(c%2 == 0){
        if(abs(a)>abs(b)){
            cout<<">";
        }
        else if(abs(a)<abs(b)){
            cout<<"<";
        }
        else{
            cout<<"=";
        }
    }
    else{
        if(a>b){
            cout<<">";
        }
        else if(a<b){
            cout<<"<";
        }
        else{
            cout<<"=";
        }
    }
}

int32_t main(){
    // #ifndef ONLINE_JUDGE
    //     freopen("input.txt","r", stdin);
    //     freopen("output.txt","w", stdout);
    // #endif

    fast;
    int t = 1;
    //cin >> t;
    //cout<<fixed<<setprecision(9);
    while(t--){
        Solve();cout<<"\n";
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	// -2 -3
	if(a > b){
		if(c&1)
			puts(">");
		else{
			b = abs(b);
			a = abs(a);
			if(a > b)
				puts(">");
			else if(a < b)
				puts("<");
			else
				puts("=");
		}
	}
	else if(a < b){
		if(c&1)
			puts("<");
		else{
			b = abs(b);
			a = abs(a);
			if(a > b)
				puts(">");
			else if(a < b)
				puts("<");
			else
				puts("=");
		}
	}
	else
		puts("=");

	return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<math.h>
#include<iomanip>
#include<string>
#include<cassert>
#include<complex>
#include<bits/stdc++.h>
#include<numeric>
#include<cassert>
#include<unordered_map>
#include<unordered_set>

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

using namespace std;

typedef long long ll; //10e18くらい
typedef long double ld;
typedef __int128_t lll;
typedef pair<ll, ll> pll;

const int dx[] = { 0,1,0,-1 };
const int dy[] = { 1,0,-1,0 };
const ll LongINF = 1e13 + 7;
const int INF = 1e9 + 7;
const ll LL_MAX = 9223372036854775807;
const ll LL_MIN = -9223372036854775807;
const double pi = 3.141592653589793;

int dsp[3] = {-1,0,1};

// int keta(ll i){

//   int keta = 0;
//   do{
//     keta++;
//   }while(i /= 10);

//   return keta;
// }
//素因数分解　O(√n)
// vector<pair<ll,ll>> pfactor(ll n){
//   vector<pair<ll,ll>> factor;
//    ll ex; //指数
//    for(ll a = 2; a * a <= n; a++){
//      if(n % a != 0)continue;

//      ll ex = 0;

//      while(n % a == 0){
//        n /= a;
//        ex++;
//      }

//      factor.push_back({a,ex});
//    }

//    if(n != 1) factor.push_back({n,1});

//   return factor;
// }

// ll gcd(int a, int b) {
//     if (b==0) return a;
//     else return gcd(b, a%b);
// }

// ll lcm(ll a, ll b) {
//     return a * b / gcd(a, b);
// }

//---------------------------------------------------------------------------------------------------
int main() {

    int a,b,c;
    cin >> a >> b >> c;
    int ans = (7-a)+(7-b)+(7-c);
    cout << ans;

}

//GIVE ME AC!!!!!!!!!!!!!!!!!
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define ll long long
#define floatset() fixed<<setprecision(15)
#define all(n) n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
#define rep(i, s, n) for (ll i = s; i < (ll)(n); i++)
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll inf =1e18;
const ll MOD=1000000007;
const ll mod=998244353;
const double pi=acos(-1);
using P=pair<ll,ll>;
int main(){
  ll k,n,m;
  cin>>k>>n>>m;
  ll a[k];
  vector<pair<ll,ll>>v;
  ll b[k];
  ll sum=0;
  rep(i,0,k){
    cin>>a[i];
    b[i]=a[i]*m/n;
    sum+=b[i];
    v.push_back({n*b[i]-m*a[i],i});
  }
  sort(all(v));
  sum=m-sum;
  rep(i,0,sum){
    b[v[i].second]++;
  }
  rep(i,0,k){
    if(i){
      cout<<" ";
    }
    cout<<b[i];
  }
  cout<<endl;
}


#include <bits/stdc++.h>
using namespace std;

int n;
vector<tuple<int, int, int>> order;
vector<tuple<int, int, int, int>> bestans;

void input() {
    cin >> n;
    order.resize(n);
    for (auto& [x, y, r] : order) cin >> x >> y >> r;
}

void init() {
    bestans.resize(n);
}

void simulate() {
    for (int i = 0; i < n; ++i) {
        auto [x, y, r] = order[i];
        auto& [a, b, c, d] = bestans[i];
        a = x, c = x + 1;
        b = y, d = y + 1;
    }
}

void output() {
    for (auto [a, b, c, d] : bestans) {
        cout << a << ' ' << b << ' ' << c << ' ' << d << '\n';
    }
}

int main() {
    input();
    init();
    simulate();
    output();
}

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, Q;
  cin >> N >> Q;
  vector<int> C(N);
  for (int i = 0; i < N; i++){
    cin >> C[i];
  }
  vector<map<int, int>> mp(N);
  vector<int> p(N);
  vector<vector<int>> g(N);
  for (int i = 0; i < N; i++){
    p[i] = i;
    mp[i][C[i]] = 1;
    g[i].push_back(i);
  }
  for (int i = 0; i < Q; i++){
    int t;
    cin >> t;
    if (t == 1){
      int a, b;
      cin >> a >> b;
      a--;
      b--;
      a = p[a];
      b = p[b];
      if (a == b){
        continue;
      }
      if (g[a].size() < g[b].size()){
        swap(a, b);
      }
      for (int x : g[b]){
        g[a].push_back(x);
        p[x] = a;
      }
      g[b].clear();
      for (auto P : mp[b]){
        mp[a][P.first] += P.second;
      }
      mp[b].clear();
    }
    if (t == 2){
      int x, y;
      cin >> x >> y;
      x--;
      cout << mp[p[x]][y] << endl;
    }
  }
}


#include <iostream>
#include <vector>
#include <numeric>
#include <set>

int main()
{
  int N;
  std::cin >> N;
  std::vector<long long> vs(2 * N);
  for (auto& v : vs) { std::cin >> v; }

  std::multiset<long long> pool;
  long long aoki = 0;
  for (int i = 0; i < N; i++)
  {
    pool.insert(vs[N - 1-i]);
    pool.insert(vs[N+i]);
    aoki += *pool.begin();
    pool.erase(pool.begin());
  }

  long long sum = std::accumulate(vs.begin(), vs.end(), 0LL);

  std::cout << sum - aoki << std::endl;
  return 0;
}

#include<bits/stdc++.h>
#define cs const
#define pb push_back
using namespace std;
typedef long long ll;
cs int N = 4e5 + 5;
int n, a[N], p[N], c[N];
ll ans;
#define mid ((l + r) >> 1)
cs int M = N << 2;
int mn[M], ta[M];
void up(int x) {
	mn[x] = min(mn[x << 1], mn[x << 1 | 1]) + ta[x];
}
void build(int x, int l, int r) {
	if(l == r) {
		mn[x] = l;
		return;
	}
	build(x << 1, l, mid);
	build(x << 1 | 1, mid + 1, r);
	up(x);
}
void mdf(int x, int l, int r, int L, int R) {
	if(L <= l && r <= R)
		return mn[x] --, ta[x] --, void();
	if(L <= mid) mdf(x << 1, l, mid, L, R);
	if(R > mid) mdf(x << 1 | 1, mid + 1, r, L, R);
	up(x);
}
int qry(int x, int l, int r, int L, int R) {
	if(L <= l && r <= R)
		return mn[x];
	int ans = 1e9;
	if(L <= mid) ans = min(ans, qry(x << 1, l, mid, L, R));
	if(R > mid) ans = min(ans, qry(x << 1 | 1, mid + 1, r, L, R));
	return ans + ta[x];
}
#undef mid

void ins(int x, int c) {
	int z = qry(1, 1, n, x, n);
	if(z) {
		ans += c;
		mdf(1, 1, n, x, n);
	}
}
int main() {
	#ifdef FSYo
	freopen("1.in", "r", stdin);
	#endif
	cin >> n;
	for(int i = 1; i <= n + n; i++)
		scanf("%d", &a[i]), p[i] = i;
	sort(p + 1, p + n + n + 1,
	[](cs int &i, cs int &j) {
		return a[i] > a[j];
	});
	build(1, 1, n);
	for(int i = 1; i <= n + n; i++) {
		int x = p[i];
		if(x <= n) {
			ins(n - x + 1, a[x]);
		}
		else {
			ins(x - n, a[x]);
		}
	}
	cout << ans;
	return 0;
}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read()
{
	int x=0;
	bool flag=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
			flag=0;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<1)+(x<<3)+c-'0';
		c=getchar();
	}
	return (flag?x:~(x-1));
}
int L,R,ans,p[1000001];
signed main()
{
	L=read();
	R=read();
	for(int i=0;i<=R;i++)
		p[i]=1;
	for(int i=2;i<=R;i++)
		for(int l=i*2;l<=R;l+=i)
			p[l]-=p[i];
	for(int i=2;i<=R;i++)
	{
		int a=R/i-(L-1)/i;
		ans+=a*a*p[i];
	}
	for(int i=max(2ll,L);i<=R;i++)
		ans+=1-2*(R/i-(L-1)/i);
	cout<<ans;
	return 0;
}

#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a),i##END=(b);i<=i##END;i++)
#define Rof(i,b,a) for(int i=(b),i##END=(a);i>=i##END;i--)
#define go(u) for(int i=head[u];i;i=nxt[i])
using namespace std;
inline int read(){
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
    return x*f;
}
const int N=1e2+10,M=1e4+10;
char s[N];int a[N],b[M][N];
signed main(){
	int n=read()+1;
	scanf("%s",s+1);
	For(i,1,n)a[i]=read();
	int k=1e5;
	For(i,2,n)k=min(k,abs(a[i]-a[i-1]));
	printf("%d\n",k);
	For(i,1,k){
		For(j,1,n){
			printf("%d ",(a[j]+i-1)/k);
		}
		puts("");
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include  <cstdlib>
#include <string.h>
#include <cstring>
#include <queue>
#include <map>

using namespace std;

#pragma warning(disable:4996)
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)

#define EPS 1e-11
#define PI acos(-1.0)

typedef unsigned long long ll;

ll arr[20010], arr1[20010];
vector<ll>v;
ll a, b;
map<unsigned long long, unsigned int> m;
priority_queue < ll, vector<ll>, greater<ll> > pq;

int main()
{
    int x;
    cin >> x;
    if (x >= 0) cout << x;
    else cout << 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main() {

	long long  n;
	cin >> n;
	vector<int> digs;
	while (n) {
		digs.push_back(n % 10);
		n /= 10;
	}
	vector<int> rec(3);
	int s = 0;
	for (auto x : digs) rec[x % 3] ++, s += x;
	s %= 3;
	if (s == 0) cout << 0;
	else if (s == 1) {
		if (rec[1] > 0 && digs.size() > 1) cout << 1;
		else if (rec[2] > 1 && digs.size() > 2) cout << 2;
		else cout << -1;
	} else {
		if (rec[2] > 0 && digs.size() > 1) cout << 1;
		else if (rec[1] > 1 && digs.size() > 2) cout << 2;
		else cout << -1;
	}
	return 0;

}


// Artur Kraska, II UWr

#include <bits/stdc++.h>

#define forr(i, n)                  for(int i=0; i<n; i++)
#define FOREACH(iter, coll)         for(auto iter = coll.begin(); iter != coll.end(); ++iter)
#define FOREACHR(iter, coll)        for(auto iter = coll.rbegin(); iter != coll.rend(); ++iter)
#define lbound(P,R,PRED)            ({typeof(P) X=P,RRR=(R), PPP = P; while(PPP<RRR) {X = (PPP+(RRR-PPP)/2); if(PRED) RRR = X; else PPP = X+1;} PPP;})
#define testy()                     int _tests; scanf("%d", &_tests); FOR(_test, 1, _tests)
#define CLEAR(tab)                  memset(tab, 0, sizeof(tab))
#define CONTAIN(el, coll)           (coll.find(el) != coll.end())
#define FOR(i, a, b)                for(int i=a; i<=b; i++)
#define FORD(i, a, b)               for(int i=a; i>=b; i--)
#define MP                          make_pair
#define PB                          push_back
#define ff                          first
#define ss                          second
#define deb(X)                      X;

#define M 1000000007
#define INF 1000000007LL

using namespace std;

int n, m, a;
long long b, c;

int main()
{
    scanf("%lld %lld", &b, &c);
    long long l1 = -b-(c-1)/2, r1 = -b+(c-1)/2, l2 = b-c/2, r2 = b+(c-2)/2;
    if(b < 0)
    {
        swap(l1, l2);
        swap(r1, r2);
    }
    {
        if(l2 <= r1)
            printf("%lld\n", max(r1, r2)-min(l1, l2)+1);
        else
            printf("%lld\n", r1-l1+1 + r2-l2+1);
    }

    return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll,int> P;

int main()
{
	ll B,C;
	cin >> B >> C;
	/*
	ll L = B - (C-1)/2;
	ll R = B;
	ll ans = 0;
	if ((L < 0 && R > 0) || (L < 0 && R < 0))
	{
		ans = 2 * max(abs(L-R));
	}
	else
	{
		ans = 2 * max(abs(L),abs(R)) + 1;
	}
	if (C % 2 == 0)
	{

	}
	*/
	vector<P> v;
	v.push_back(P(B-(C-1)/2,1));
	v.push_back(P(B+1,-1));
	v.push_back(P(-1*(B-(C-1)/2)+1,-1));
	v.push_back(P(-1*B,1));

	v.push_back(P(-1*B-(C/2-1),1));
	v.push_back(P(-1*B+1,-1));
	v.push_back(P(-1*(-1*B-(C/2-1))+1,-1));
	v.push_back(P(B,1));

	v.push_back(P(B-C/2,1));
	v.push_back(P(B-C/2+1,-1));

	v.push_back(P(-1*B-(C-1)/2,1));
	v.push_back(P(-1*B-(C-1)/2+1,-1));

	sort(v.begin(), v.end());

	ll ans = 0;
	ll tmp = v[0].first;
	int t = 1;
	for (int i = 1; i < v.size(); ++i)
	{
		if (t > 0)
		{
			ans += v[i].first - tmp;
		}
		tmp = v[i].first;
		t += v[i].second;
	}
	cout << ans << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define rep(i, a, n) for (int i = a; i <= n; ++i)
#define per(i, n, a) for (int i = n; i >= a; --i)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long LL;
typedef pair<int, int> PII;
mt19937 rnd(time(0));

inline int in() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-')
      f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return f * x;
}

const int inf = (1 << 30);
const int mod = 998244353;
const int N = 400010;

LL ksm(LL a, LL b, LL MOD = mod) {
  LL res = 1;
  while (b) {
    if (b & 1)
      res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}

LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; }
LL exgcd(LL a, LL b, LL &x, LL &y) {
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  LL g = exgcd(b, a % b, y, x);
  y -= a / b * x;
  return g;
}

LL Inv(LL a, LL b = mod) {
  assert(gcd(a, b) == 1);
  a %= b;
  return ksm(a, b - 2, b);
}

LL fac[N], inv[N];

void init(int n) {
  fac[0] = 1;
  rep(i, 1, n) fac[i] = fac[i - 1] * i % mod;
  inv[n] = ksm(fac[n], mod - 2);
  per(i, n - 1, 0) inv[i] = inv[i + 1] * (i + 1) % mod;
}

LL C(int n, int m) {
  if (m > n || m < 0)
    return 0;
  return fac[n] * inv[m] % mod * inv[n - m] % mod;
}

int _mu[N], isp[N];
VI p;
void init_prime(int n) {
  _mu[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!isp[i])
      p.push_back(i), _mu[i] = -1;
    for (int j = 0; j < (int)p.size() && i * p[j] <= n; ++j) {
      isp[i * p[j]] = 1;
      if (i % p[j] == 0) {
        _mu[i * p[j]] = 0;
        break;
      }
      _mu[i * p[j]] = -_mu[i];
    }
  }
}

void solve() {
  int n = in(), m = in();
  init(n + m);
  init_prime(n + m);
  LL ans = 0;
  rep(i, 1, m) {
    LL val = 1;
    int w = i;
    for (int j = 0; j < (int)p.size(); ++j) {
      if (p[j] * p[j] > w)
        break;
      int res = 0;
      while (w % p[j] == 0) {
        w /= p[j];
        ++res;
      }
      (val *= C(res + n - 1, n - 1)) %= mod;
    }
    if (w > 1)
      (val *= n) %= mod;
    (ans += val) %= mod;
  }
  printf("%lld\n", ans);
}

int main() {
#ifndef ONLINE_JUDGE
  freopen("in.in", "r", stdin);
  // freopen("out.out", "w", stdout);
#endif
  int T = 1;
  // T = in();
  while (T--) {
    solve();
  }
}

#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <climits>
#include <string>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <ctime>
#include <cassert>
#include <fstream>
#include <stack>
#include <random>
#include <iomanip>

#include <fstream>

using namespace std;
typedef long long ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E18;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
dd EPS=1E-9;
#define endl "\n"
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

ll f(char c){
    ll k=c-'0';
    if(0<=k && k<=9){
        return k;
    }
    ll l=c-'A';
    return 10+l;
}

int main(){fastio
    string N;cin>>N;
    ll K;cin>>K;
    ll n;n=(ll)N.size();
    ll dp[2][n][17];
    ll bol[n][16];rep(i,0,n-1)rep(j,0,15)bol[i][j]=0;
    rep(i,0,n-1){
        if(i>0){
            rep(j,0,15){
                bol[i][j]=bol[i-1][j];
            }
        }
        bol[i][f(N[i])]=1;
    }
    /*
    rep(i,0,15){
        rep(j,0,n-1){
            cout<<bol[j][i]<<' ';
        }
        cout<<endl;
    }
    cout<<endl;
     */

    rep(i,0,n-1){
        rep(j,1,15){
            bol[i][j] = bol[i][j-1]+bol[i][j];
        }
    }
    /*
    rep(j,0,15){
        rep(i,0,n-1){
            cout<<bol[i][j]<<' ';
        }
        cout<<endl;
    }
    cout<<endl;
    */

    //bol[i][j]=0~jのうちN[i]までで現れたものの個数
    rep(i,0,n-1){
        rep(j,0,16){
            if(j==bol[i][15]){
                dp[0][i][j]=1;
            }else{
                dp[0][i][j]=0;
            }
            if(i==0){
                if(j==0){
                    dp[1][i][j]=1;
                }else if(j==1){
                    dp[1][i][j]=f(N[i])-1;
                }else{
                    dp[1][i][j]=0;
                }
            }else{
                if(j==0){
                    dp[1][i][j]=1;
                }else{
                    if(f(N[i]) == 0){
                        if(j==1){
                            dp[1][i][j] = mod(dp[1][i-1][j-1]*(16-j)+dp[1][i-1][j]*j);
                        }else{
                            dp[1][i][j] = mod(dp[1][i-1][j-1]*(17-j)+dp[1][i-1][j]*j);
                        }

                    }else{
                        if(j==1){
                            dp[1][i][j] = mod(dp[1][i-1][j-1]*(16-j)+dp[1][i-1][j]*j);
                        }else{
                            dp[1][i][j] = mod(dp[1][i-1][j-1]*(17-j)+dp[1][i-1][j]*j);
                        }

                        dp[1][i][j] += dp[0][i-1][j]*(bol[i-1][f(N[i])-1]);
                        dp[1][i][j] = mod(dp[1][i][j]);
                        dp[1][i][j] += dp[0][i-1][j-1]*(f(N[i])-bol[i-1][f(N[i])-1]);
                        dp[1][i][j] = mod(dp[1][i][j]);
                    }
                }
            }
        }
    }
    ll ans=0;
    ans += dp[0][n-1][K];
    ans = mod(ans);
    ans += dp[1][n-1][K];
    ans = mod(ans);
    cout<<ans<<endl;

    /*
    rep(i,0,15){
        rep(j,0,n-1){
            cout<<bol[j][i]<<' ';
        }
        cout<<endl;
    }
    cout<<endl;

    rep(k,0,1){
        cout<<"k: "<<k<<endl;
        rep(j,0,15){
            rep(i,0,n-1){
                cout<<dp[k][i][j]<<' ';
            }
            cout<<endl;
        }
        cout<<endl;
    }
    */

    return 0;

}


#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<int64_t> a(n),maxA(n);

    for(int i = 0;i < n;i++)cin >> a.at(i);

    int64_t ma = 0;
    for(int i = 0;i < n;i++){
        ma = max(ma,a.at(i));
        maxA.at(i) = ma;
    }
    int64_t ans = 0;
    a.at(0) += a.at(0);
    ans += a.at(0);
    cout << ans << endl;
    for(int i = 1;i < n;i++){
        ans += (maxA.at(i) - maxA.at(i-1))*i;
        a.at(i) += a.at(i-1)+(maxA.at(i) - maxA.at(i-1));
        ans += a.at(i);
        cout << ans << endl;
    }
}

#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;

int main()
{
    long N;
    cin >> N;
    long result = 0;
    long A[N];
    long sum = 0;

    for (long i = 0; i < N; i++) {
        cin >> A[i];
        result += N * A[i] * A[i];
        sum += A[i];
    }

    cout << result - sum * sum << endl;

}


#include <bits/stdc++.h>
using namespace std;

int n, k;
int dp[200005];
vector <int> Adj[200005];

int ans;
int f[200005];
int r[200005];

void DFS(int node, int maxx, int p = 0)
{
	r[node] = 1;
	for(auto x : Adj[node])
	{
		if(x == p)
		{
			continue;
		}
		DFS(x, maxx, node);
		r[node] = max(r[node], r[x] + 1);
	}
	if(r[node] <= f[node])
	{
		r[node] = 0;
	}
	if(r[node] == maxx + 1)
	{
		r[node] = 0;
		f[node] = maxx + 1;
		ans++;
	}
	f[p] = max(f[p], f[node] - 1);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	// freopen("Input.txt", "r", stdin);
	// freopen("Output.txt", "w", stdout);
	cin >> n >> k;
	for(int i = 1; i <= n; i++)
	{
		int u, v;
		cin >> u >> v;
		Adj[u].push_back(v);
		Adj[v].push_back(u);
	}
	int ll = 1, rr = 2e5;
	while(ll < rr)
	{
		ans = 0;
		int mid = (ll + rr) >> 1;
		for(int i = 1; i <= n; i++)
		{
			r[i] = 0;
			f[i] = 0;
		}
		DFS(1, mid);
		if(r[1])
		{
			ans++;
		}
		if(ans <= k)
		{
			rr = mid;
		}
		else
		{
			ll = mid + 1;
		}
	}
	cout << ll;
}

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<complex>
#include<cstdio>
#define initdp(a,b) for(int i=0;i<=a;i++)for(int j=0;j<=b;j++)dp[i][j]=-1;
#define fi first
#define se second
#define pb push_back
#define pii pair<int,int>
#define ppi pair<pii,int>
#define pip pair<int,pii>
#define ll long long
#define pll pair<ll,ll>
#define rep(i,n) for(int i=0;i<n;i++)
#define repd(i,n) for(int i=n-1;i>=0;i--)
#define inf 1000000001
#define inf1 1000000000000000001
#define mod 1000000007
#define pie 3.14159265358979323846
#define N 1000005
#define mid(l,r) l+(r-l)/2
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
int ddx[8]={1,1,0,-1,-1,-1,0,1},ddy[8]={0,1,1,1,0,-1,-1,-1};
void mad(ll &a,ll b){a=(a+b)%mod;if(a<0)a+=mod;}
ll gcd(ll a,ll b){ if(!a)return b;return gcd(b%a,a);}
int ed[20][20];
int n,m;
//int dp[20][1<<20];
int dp[1<<20];
/*int pos[1<<20];
int rec(int u,int mask){
	if(mask+1==(1<<n)||u==n)return 0;
	if(dp[u][mask]!=m+1)return dp[u][mask];
	if(mask&(1<<u))return dp[u][mask]=rec(u+1,mask);
	int &res=dp[u][mask]=1+rec(u+1,mask|(1<<u));
	int newmask=(1<<u);
	for(int i=0;i<n;i++){
		//if(mask&(1<<i))continue;
		if(!ed[u][i])continue;
		newmask|=(1<<i);
	}
	for(int i=newmask;i;i=(i-1)&newmask)
	if(pos[i]){//cout<<i<<"\n";
		res=min(res,1+rec(u+1,mask|i));
		break;
	}
	return res;
}*/
void solve(){
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int u,v;
		cin>>u>>v;
		u--;
		v--;
		ed[u][v]=ed[v][u]=1;
	}
	for(int i=0;i<n;i++)ed[i][i]=1;
	//for(int i=0;i<n;i++)
		for(int j=0;j<(1<<n);j++)dp[j]=inf;
	for(int i=0;i<(1<<n);i++){
		int f=0;
		for(int j=0;j<n;j++){
			for(int k=0;k<n;k++){
				if(!(i&(1<<j)))continue;
				if(!(i&(1<<k)))continue;
				if(!ed[j][k]){f=1;break;}
			}
		}
		if(!f){
			//pos[i]=1;
			//if(i&1)dp[0][i]=1;
			dp[i]=1;
		}
		//cout<<i<<" "<<pos[i]<<"\n";
	}
	/*for(int i=1;i<n;i++){
		for(int mask=0;mask<(1<<n);mask++){
			if(!(mask&(1<<i)))continue;
			dp[i][mask]=min(dp[i][mask],dp[i-1][mask]);
			for(int s=mask;s;s=(s-1)&mask){
				if(pos[mask^s])dp[i][mask]=min(dp[i][mask],1+dp[i-1][s]);
			}
		}
	}*/

	for(int mask=1;mask<(1<<n);mask++){
		for(int s=mask;s;s=(s-1)&mask){
			dp[mask]=min(dp[mask],dp[mask^s]+dp[s]);
		}
		//cout<<dp[mask]<<"\n";
	}
	//cout<<pos[(1<<n)-1];
	//cout<<rec(0,0);
	//cout<<dp[n-1][(1<<n)-1];
	cout<<dp[(1<<n)-1];
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t=1;
	//cin>>t;
	while(t--){
		solve();
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <iomanip>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cstdlib>
#include <queue>
#include <stack>
#include <bitset>

using namespace std;

#define MOD 1000000007
#define PI 3.1415926535897932
#define INF 1e9
#define rep(i, n) for (int i = 0; i < n; i++)
#define repe(i, j, n) for (int i = j; i < n; i++)
#define repi(i, n) for (int i = 0; i <= n; i++)
#define repie(i, j, n) for (int i = j; i <= n; i++)
#define all(x) x.begin(), x.end()
#define println() cout << endl
#define P pair<int, int>
#define fi first
#define se second
typedef long long ll;
using Graph = vector<vector<ll>>;

long long modinv(long long a, long long m)
{
    long long b = m, u = 1, v = 0;
    while (b)
    {
        long long t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0)
        u += m;
    return u;
}

ll dp[2000][2000];
ll nCr(ll n, ll r)
{
       if(n==r) return dp[n][r] = 1;
       if(r==0) return dp[n][r] = 1;
       if(r==1) return dp[n][r] = n%MOD;
       if(dp[n][r]) return dp[n][r]%MOD;
       return dp[n][r] = nCr(n-1,r)%MOD + nCr(n-1,r-1)%MOD;
}

ll H(ll n, ll r) {
    return nCr(n+r-1, r)%MOD;
}

int prime[10000000];
bool is_prime[100000000 + 1];

int sieve(int n) {
    int pcnt = 0;
    for(int i = 0; i <= n; i++) {
        is_prime[i] = true;
    }

    is_prime[0] = is_prime[1] = false;
    for(int i = 2; i <= n; i++) {
        if(is_prime[i]) {
            prime[pcnt++] = i;
            for(int j = 2*i; j <= n; j += i) {
                is_prime[j] = false;
            }
        }
    }

    return pcnt;
}

struct UnionFind {
	//自身が親であれば、その集合に属する頂点数に-1を掛けたもの
	//そうでなければ親のid
	vector<ll> r;
	UnionFind(ll N) {
		r = vector<ll>(N, -1);
	}
	ll root(ll x) {
		if (r[x] < 0) return x;
		return r[x] = root(r[x]);
	}
	bool unite(ll x, ll y) {
		x = root(x);
		y = root(y);
		if (x == y) return false;
		if (r[x] > r[y]) swap(x, y);
		r[x] += r[y];
		r[y] = x;
		return true;
	}
	ll size(ll x) {
		return -r[root(x)];
	}

    bool same(ll x, ll y) { // 2つのデータx, yが属する木が同じならtrueを返す
        ll rx = root(x);
        ll ry = root(y);
        return rx == ry;
    }
};

void solve1() {
    ll m, h; cin >> m >> h;

    if(h%m==0) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

int main()
{
    solve1();
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
    int m,h;
    cin >> m >> h;
    if(h % m == 0){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define int long long
#define FOR(i,a,b,c) for(int i=a;i<b;i+=c)
#define REV(i,a,b,c) for(int i=a;i>=b;i-=c)
#define all(x) x.begin(),x.end()
#define Dhruv main

const int pinf=LLONG_MAX;
const int ninf=LLONG_MIN;
const int mod=1000000007;

using namespace std;
using namespace __gnu_pbds;

typedef tree
<int,null_type,less <int>,rb_tree_tag,tree_order_statistics_node_update>
indexed_set;

typedef tree
<int,null_type,less_equal <int>,rb_tree_tag,tree_order_statistics_node_update>
indexed_multiset;

template <typename T>
istream & operator>>(istream &is, vector<T> &v) {
    for(auto &data:v){
    	is>>data;
    }
    return is;
}

template <typename T>
ostream & operator<<(ostream &os,const vector<T> &v) {
    for(auto &data:v){
    	os<<data<< " ";
    }
    return os;
}

int32_t Dhruv(){

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int T=1;

	while(T--){
		  int n;
		  cin>>n;
		  vector <int> a(n);
		  cin>>a;
		  vector <int> b(n);
		  cin>>b;
		  cout<<a[0]*b[0]<< "\n";

		  vector <int> p(n);
		  p[0]=a[0];
		  FOR(i,1,n,1) p[i]=max(p[i-1],a[i]);
		  vector <int> c(n);
		  c[0]=a[0]*b[0];
		  FOR(i,1,n,1){

		    c[i]=max(c[i-1],p[i]*b[i]);

		    cout<<c[i]<< "\n";
		  }

	}

	#ifdef LOCAL
    	cout<< "Time Elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<< "s\n";
    #endif

    return 0;

}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

const long long modd = 998244353;
const int N = 5000;

long long mp[N + 5][N + 5];
long long su[N + 5][N + 5];
long long n, m;

void init()
{
	su[0][0] = 1;
	for (long long j = 1; j <= m; ++j)
	{
		mp[j][0] = 1;
		su[j][0] = (su[j - 1][0] + 1) % modd;
		for (long long i = 1; i <= n; ++i)
		{
			mp[j][i] = mp[j][i - 1] * j % modd;
			su[j][i] = (su[j - 1][i] + mp[j][i]) % modd;
		}
	}
}

int main()
{
	scanf("%lld%lld", &n, &m);
	init();
	long long ans = mp[m][n] * n % modd;
	for (int i = 2; i <= n; ++i)
	{
		for (int j = 1; j < i; ++j)
		{
			ans -= su[m - 1][i - j - 1] * mp[m][n - i + j - 1] % modd;
			ans = (ans + modd) % modd;
		}
	}
	printf("%lld", ans);
	return 0;
}


#include<cstdio>
#include<iostream>
#include<queue>
#include<algorithm>
#include<cstring>
#include<set>
#include<vector>
#include<cmath>
#define PII pair<int,int>
#define pb push_back
#define ep emplace_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
inline int read(){
	int 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^48);c=getchar();}
	return f==1?x:-x;
}
inline void print(int x){
	if(x<0) putchar('-'),x=~x+1;
	if(x>=10) print(x/10);
	putchar((x%10)|48);
}
int n;
struct edge{
	int u,v,w;
	bool operator <(const edge &x)const{
		return w<x.w;
	}
}e[100010];
int fa[210];
int m;
PII node[110];
int find(int x){
	return fa[x]==x?x:fa[x]=find(fa[x]) ;
}
int main(){
	n=read();
	for(int i=1;i<=n+2;++i) fa[i]=i;
	for(int i=1;i<=n;++i){
		int x=read(),y=read();
		node[i]=mp(x,y);
		e[++m].u=i,e[m].v=n+1,e[m].w=(100-y)*(100-y);
		e[++m].u=i,e[m].v=n+2,e[m].w=(y+100)*(y+100);
		for(int j=1;j<i;++j){
			e[++m].u=j,e[m].v=i,e[m].w=(x-node[j].fi)*(x-node[j].fi)+(y-node[j].se)*(y-node[j].se);
		}
	}
	sort(e+1,e+m+1);
	for(int i=1;i<=m;++i){
		int fx=find(e[i].u);
		int fy=find(e[i].v);
		if(fx!=fy) fa[fx]=fy;
		if(find(n+1)==find(n+2)){
			printf("%.10Lf\n",sqrt(1.0L*e[i].w)/2.0L);return 0;
		}
	}
}

#include <bits/stdc++.h>
#define int long long
using namespace std;

int n;double eps=1e-6,ans;
int fath[105];

struct node
{
	int x,y;
}a[105];

double dis(double a1,double b1,double c1,double d1)
{
	return sqrt((c1-a1)*(c1-a1)+(b1-d1)*(b1-d1));
}

int fin(int x)
{
	if (x==fath[x])  return x;
	else return fath[x]=fin(fath[x]);
}

bool check(double mid)
{
	for (int i=1;i<=n+2;i++)  fath[i]=i;
	for (int i=1;i<=n-1;i++)
	{
		for (int j=i+1;j<=n;j++)
		{
			if (dis(a[i].x,a[i].y,a[j].x,a[j].y)<mid)
			  fath[fin(j)]=fin(i);
		}
	}
	for (int i=1;i<=n;i++)
	{
		if (abs(a[i].y-100)<mid)  fath[fin(i)]=fin(n+1);
	}
	for (int i=1;i<=n;i++)
	{
		if (abs(a[i].y+100)<mid)  fath[fin(i)]=fin(n+2);
	}
	for (int i=1;i<=n+2;i++)  fath[i]=fin(fath[i]);
	if (fin(n+1)==fin(n+2))  return false;
	else return true;
}

signed main()
{
	cin>>n;
	for (int i=1;i<=n;i++)  cin>>a[i].x>>a[i].y;

	double l=0.00,r=200.00;
	while (l+eps<=r)
	{
		double mid=(l+r)/2.00;
		if (check(2.00*mid))  l=mid+eps,ans=mid;
		else r=mid-eps;
	}
	cout<<fixed<<setprecision(4)<<ans<<endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

#define rep(i, a, b) for (auto i = (a); i < (b); ++i)
#define per(i, a, b) for (auto i = (b); i-- > (a); )
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) int((x).size())
#define lb(x...) lower_bound(x)
#define ub(x...) upper_bound(x)

template<class T> bool ckmin(T& a, const T& b) { return a > b ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int n; cin >> n;
	int D, H; cin >> D >> H;

	float ans = 0;
	rep(i, 0, n) {
		int d, h; cin >> d >> h;
		ckmax(ans, (float) (h * D - H * d) / (D - d));
	}

	cout << fixed << setprecision(10) << ans << '\n';
}

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author tatsumack
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

using namespace std;

typedef pair<int, int> P;

class BOrthogonality {
public:
    void solve(std::istream& cin, std::ostream& cout) {
        int N;
        cin >> N;
        vector<int> A(N), B(N);
        REP(i, N) cin >> A[i];
        REP(i, N) cin >> B[i];

        int res = 0;
        REP(i, N) res += A[i] * B[i];
        cout << (res == 0 ? "Yes" : "No") << endl;
    }
};

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);

    BOrthogonality solver;
    solver.solve(in, out);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
static const auto _____ = []() {
	// fast IO code : this I understand
	ios::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(0);
	return 0;
}();
/******************** //    Macros  // ************************/
#define ll long long int
#define MAX 1000000
#define bitscount 32
#define mod 1000000007

int mpow(int base, int exp) {
	base %= mod;
	int result = 1;
	while(exp > 0) {
		if(exp & 1) result = ((ll)result * base) % mod;
		base = ((ll)base * base) % mod;
		exp >>= 1;
	}
	return result;
}
ll gcdExtended(ll a, ll b, ll *x, ll *y) {
    if (a == 0) {
        *x = 0, *y = 1;
        return b;
    }
    ll x1, y1;
    ll gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}
ll modInverse(ll b, ll m) {
    ll x, y;
    ll g = gcdExtended(b, m, &x, &y);
    if (g != 1)
        return -1;
    return (x%m + m) % m;
}

struct st {
	int a, b;
};

bool sortfunc (pair<int,int> a, pair<int,int> b) {
	return a.first < b.first;
}
ll gcd(ll a, ll b) {
	return (b == 0) ? a : gcd(b, a%b);
}

int dx[] = {0, 1, -1, 0};
int dy[] = {-1, 0, 0, 1};
//..................................................

ll 	mini = INT_MAX;
ll 	allinterval(vector<int> &v, int n, int start, int result) {
	if(start == n)
		return result;
	int ored = 0;
	for(int i = start; i < n; ++i) {
		ored = ored | v[i];
		mini = min(mini , allinterval(v, n, i + 1, ored xor result));
	}
	return mini;
}
void testcase(){
	int n;
	cin >> n;
	vector<int>v(n);
	for(int i = 0; i < n; ++i) {
		cin >> v[i];
	}
	ll ans = allinterval(v,n,0,0);
	cout << ans << endl;

}

int main()
{
	// int t;
	// cin >> t;
	// while (t--)
	// {
		testcase();
	// }
	return 0;
}

#include <iostream>
#include <iomanip>
#include <vector>
#include <string>

#include <algorithm>
#include <numeric>
#include <cmath>

using namespace std;
typedef long long ll;
const long double PI = (acos(-1));
const long long MOD = 1000000007;

static const int  MAX_INT  = std::numeric_limits<int>::max();
static const long MAX_LONG = std::numeric_limits<long>::max();
static const ll   MAX_LL   = std::numeric_limits<long long>::max();

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

///////////////////////////////////////////////////
// ------------------- utils ------------------- //
///////////////////////////////////////////////////
// change min/max
template<class T> inline bool chMin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chMax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

///////////////////////////////////////////////////
// ------------------- main -------------------- //
///////////////////////////////////////////////////

struct mint {
    static const int mod = 1000000007;
    long long x; // typedef long long ll;
    mint(long long x = 0) :x((x%mod + mod) % mod) {}
    mint operator-() const { return mint(-x); }
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; }
    mint operator+(const mint a) const { return mint(*this) += a; }
    mint operator-(const mint a) const { return mint(*this) -= a; }
    mint operator*(const mint a) const { return mint(*this) *= a; }
    mint pow(long long t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const { return pow(mod - 2); }
    mint& operator/=(const mint a) { return *this *= a.inv(); }
    mint operator/(const mint a) const { return mint(*this) /= a; }
};
std::istream& operator>>(std::istream& is, mint& a) { return is >> a.x; }
std::ostream& operator<<(std::ostream& os, const mint& a) { return os << a.x; }

void countNb(ll& res) {
    ll n, a, b; cin >> n >> a >> b;

    // ensure A <= B
    if (b < a) {
        ll tmp = a;
        a = b;
        b = tmp;
    }

    mint N(n), A(a), B(b);

    mint nbA = N - (A - 1); nbA = nbA * nbA;
    mint nbB = N - (B - 1); nbB = nbB * nbB;
    mint nbtotal = nbA * nbB;

    // dupulication: inside
    mint nbAb = B - (A - 1); nbAb = nbAb * nbAb;
    mint nbInside = nbAb * nbB;

    // cross
    mint cnt = 0;
    for (ll alpha = 1; alpha < a; ++alpha) {
        mint Alpha(alpha);
        mint nbCross = (B - A + Alpha * 2) * 4;
        mint nbIn = N - (B + Alpha - 1); nbIn = nbIn * nbIn;
        cnt += nbCross * nbIn;
    }

    mint count = nbtotal - nbInside - cnt;
    res = count.x;
}

void countNb2(ll& res) {
    mint N, A, B; cin >> N >> A >> B;
    ll nbSpace = N.x - A.x - B.x;
    mint x3 = (nbSpace >= 0) ? (N-A-B+2)*(N-A-B+1) : 0;
    mint x2 = (N-A+1)*(N-B+1) - x3;
    mint x1 = x2 * x2;
    mint total = (N-A+1)*(N-B+1) * (N-A+1)*(N-B+1);
    mint ans = total - x1;
    res = ans.x;
}

void Main() {
    ll T; cin >> T;
    vector<ll> res(T);
    for (ll i = 0; i < T; ++i) {
        countNb2(res[i]);
    }

    rep(i, T) {
        cout << res[i] << endl;
    }
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    std::cout << std::fixed << std::setprecision(15);
    Main();

    double tmp;
    cin >> tmp;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

using ll = long long;
const int mod = 1e9+7;

int main(){
    int N; cin >> N;
    vector<ll> A(N), sum(N+1);
    for(int i=0; i<N; i++){
        cin >> A[i];
        sum[i+1] = sum[i]+A[i];
    }
    vector<vector<int>> dp(N+2,vector<int>(N+2));
    dp[1][0]++;
    int ans = 0;
    for(int i=0; i<N; i++){
        for(int j=N; 1<=j; j--){
            dp[j+1][sum[i+1]%(j+1)] += dp[j][sum[i+1]%j];
            dp[j+1][sum[i+1]%(j+1)] %= mod;
            if(i == N-1){
                ans += dp[j][sum[i+1]%j];
                ans %= mod;
            }
        }
    }
    cout << ans << endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define P pair<ll,ll>
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)
#define FORR(I,A,B) for(ll I = ll((B)-1); I >= ll(A); --I)
#define TO(x,t,f) ((x)?(t):(f))
#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin()) //xi>=v  x is sorted
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin()) //xi>v  x is sorted
#define NUM(x,v) (POSU(x,v)-POSL(x,v))  //x is sorted
#define REV(x) (reverse(x.begin(),x.end())) //reverse
ll gcd_(ll a,ll b){if(a%b==0)return b;return gcd_(b,a%b);}
ll lcm_(ll a,ll b){ll c=gcd_(a,b);return ((a/c)*b);}
#define NEXTP(x) next_permutation(x.begin(),x.end())
const ll INF=ll(1e16)+ll(7);
const ll MOD=1000000007LL;
#define out(a) cout<<fixed<<setprecision((a))
//tie(a,b,c) = make_tuple(10,9,87);
#define pop_(a) __builtin_popcount((a))
ll keta(ll a){ll r=0;while(a){a/=10;r++;}return r;}
#define num_l(a,v) POSL(a,v) //v未満の要素数
#define num_eql(a,v) POSU(a,v) //v以下の要素数
#define num_h(a,v) (a.size() - POSU(a,v)) //vより大きい要素数
#define num_eqh(a,v) (a.size() - POSL(a,v)) //v以上の要素数

// http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2871291
// https://atcoder.jp/contests/arc017/submissions/10729573
template <typename T>
class Seg_Tree{
public: // 0-index
	vector<T> dat;
	T initial,M;
	int n;
	T unite(T a,T b){//
		return (a + b)%M;
	}
	/*Seg_Tree(int n0_=1,T initial_=1,T M_=1){
		initsize(n0_,initial_,M_);
	}*/
	void initsize(int n0,T initial_,T M_){
		M = M_;
		initial = initial_;
		int k=1;
		while(1){
			if(n0<=k){
				n=k;
				dat.resize(2*n-1);
				for(int i=0;i<2*n-1;i++)dat[i]=initial;
				break;
			}
			k*=2;
		}
	}

	//i banme wo x nisuru
	void update(int i,T x){
		i += n-1;
		dat[i] = x;
		while(i>0){
			i = (i-1) / 2;
			dat[i] = unite(dat[i*2+1],dat[i*2+2]);
		}
	}

	//[a,b)
	T query0(int a,int b,int k,int l,int r){
		if(r<=a || b<=l)return initial;
		if(a<=l && r<=b)return dat[k];
		else{
			T vl = query0(a,b,k*2+1,l,(l+r)/2);
			T vr = query0(a,b,k*2+2,(l+r)/2,r);
			return unite(vl,vr);
		}
	}

	//return [a,b)
	T query(int a,int b){
		return query0(a,b,0,0,n);
	}
};

int main(){

	ll N;
	cin >> N;
	vector<ll> A(N+1,0),sum(N+1,0);
	FOR(i,1,N+1) cin >> A[i];
	FOR(i,1,N+1) sum[i] = sum[i-1] + A[i];

	vector< vector<ll> > dp(N+1,vector<ll>(N+1,0));

	dp[0][0] = 1;

	vector<ll> wa(N+6,0);
	//wa[1] = 1;
	wa[0] = 1;
	vector< Seg_Tree<ll> > Sg();

	FOR(j,1,N+1){ // j個に分ける方法
		FOR(i,1,N+1){ // i個目までで
			(dp[i][j] += wa[ sum[i] % j ]) %= MOD;
			( wa[ sum[i] % j ] += dp[i][j-1] ) %= MOD;
			//(wa[ sum[i] % j ] += dp[i][j]) %= MOD;
		}
		FOR(i,0,N+1)wa[i] = 0;
		//FOR(i,0,N+1)(wa[ sum[i]%(j+1) ] += dp[i][j]) %= MOD;
	}

	ll ans = 0;
	FOR(i,1,N+1){
		( ans += dp[N][i] ) %= MOD;
	}
	cout << ans << endl;
}


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

int main() {
	long long N;
	cin >> N;
	int ans = 0;
	for (int d = 0; d < 6; d++) {
		for (long long j = pow(10ll, d); j < pow(10ll, d + 1); j++) {
			if (j * pow(10ll, d + 1) + j > N) break;
			ans++;
		}
	}
	cout << ans << endl;
}


#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
typedef long long ll;
using namespace std;
int main() {
	ll s, p;
	cin >> s >> p;
	bool ok = false;
	for (ll i = 1; i*i <= p; i++) {
		if (p%i == 0) {
			if (s - i == p / i) ok = !ok;
		}
	}
	if (ok) puts("Yes");
	else puts("No");
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long S;
  long long P;
  cin>>S>>P;
  int a=0;
  long long sum=sqrt(P);
  for(long long i=0;i<sum;i++){
    if(S*(i+1)-(i+1)*(i+1)==P){
      cout<<"Yes"<<endl;
      a=1;
      break;
    }
  }
  if(a==0){
    cout<<"No"<<endl;
  }
}


#include <bits/stdc++.h>
using namespace std;
#define intt long long int
#define F first
#define S second
#define pb push_back
const int N=1e5+5;
vector<pair<int,pair<int,int>>> adj[N];
intt vis[N],tim[N];
int n,m;
const intt INF=1e15;

intt calc(intt c,intt d,intt t)
{
  //  cout<<c<<" "<<d<<" "<<t<<endl;
    intt ret=t+c+d/(t+1);
    intt rt=sqrt(d);
    if(t>rt){  return ret;}

    t=rt;
    ret=min(ret,t+c+d/(t+1));
    t--;
    if(t>=0) ret=min(ret,t+c+d/(t+1));
   // cout<<"dd   "<<ret<<endl;
    return ret;
}

void dijkstra(int s)
{
    set<pair<intt,intt>> sett; // time, city index
    sett.insert({0,s});
    for(int i=1;i<=n;i++)
    {
        tim[i]=INF;
    }
    tim[1]=0;

    while(!sett.empty())
    {
        pair<intt,intt> aa=*sett.begin();
        sett.erase(sett.begin());
        if(tim[aa.S]<aa.F)
        { continue;}

        //assert(tim[aa.S]==aa.F);

        int pp=aa.S,tt=aa.F;
        for(auto ss:adj[pp])
        {
            int ind=ss.F;
            int cc=ss.S.F,dd=ss.S.S;

            intt time_=calc(cc,dd,tim[pp]);
            //cout<<time_<<endl;
            if(time_<tim[ind])
            {
                tim[ind]=time_;

                sett.insert({time_,ind});
            }
        }

    }
}
int main()
{
   cin>>n>>m;

   for(int i=0;i<m;i++)
   {
       int a,b,c,d;cin>>a>>b>>c>>d;
       if(a==b) continue;
       adj[a].pb({b,{c,d}});
       adj[b].pb({a,{c,d}});
   }
   dijkstra(1);

   // for(int i=1;i<=n;i++) cout<<tim[i]<<endl;

    if(tim[n]==INF)cout<<-1<<endl;
    else
   cout<<tim[n]<<endl;
    return 0;
}

#include <bits/stdc++.h>
#include <bits/extc++.h>
#define double long double
#define rbtree __gnu_pbds::tree<int,__gnu_pbds::null_type,less<int>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>
#define int ll
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define ALL(X) X.begin(),X.end()
#define F(i,n)  FF(i,0,n)
#define F1(i,n)  FF(i,1,n+1)
#define FF(i,n,m) for(int i=(int)n;i<(int)m;++i)
#ifndef LOCAL
//#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
#else
#endif // LOCOL
//#define mp make_pair
using namespace std;
//using namespace __gnu_pbds;
template<typename T> bool remax(T& a, const T& b) {return b>a?a=b,1:0;}
template<typename T> bool remin(T& a, const T& b) {return b<a?a=b,1:0;}
inline ostream& operator << (ostream& os,__int128_t a){if(a==0) {return (os<<'0');}bool flag=0;if(a<0) {a=-a,flag=1;}string s;while(a){s+=a%10+'0';a/=10;}s+=flag?"-":"";reverse(ALL(s));return os<<s;}
inline istream& operator >>(istream& is,__int128_t& a){string s;cin>>s;a=0;for(auto c:s) a=a*__int128_t(10)+__int128_t(c-'0');return is;}
template<typename T,typename P> inline ostream& operator << (ostream& os,pair<T,P> a){os<<a.first<<" "<<a.second; return os;}
template<typename T,typename P> inline istream& operator >> (istream& is,pair<T,P> &a){is>>a.first>>a.second; return is;}
using ll=long long;
using ull=unsigned long long;
using int128= __int128_t;
using uint128= __uint128_t;
using pii =pair<int,int>;
const double pi=acos(-1);
const int N=1E5+5;
const ll M=1000000000;
const ll INF_64=0x3f3f3f3f3f3f3f3f;
const int INF_32=0x3f3f3f3f;
const int16_t INF_16=0x3f3f;
const int klog=20;
const int mod=998244353;//1E9+7
const double eps=1E-8;
void gen(){
}

int d[N]{};
vector<pair<int,pii>> g[N];
int dis(int c,int d,int t){
    double l=0,r=1E14;
    F(_,100){
        double m1=l+(r-l)/3.0,m2=r-(r-l)/3.0;
        double mv1=t+m1+c+(d/(t+m1+1.0));
        double mv2=t+m2+c+(d/(t+m2+1.0));
        if(mv1==mv2) l=m1,r=m2;
        else if(mv1>mv2) l=m1;
        else r=m2;
    }
    int re=INF_64;
    int L=l,R=r;
    FF(j,L-3,R+3)
        if(j>=0)remin(re,t+j+c+(d/(t+j+1)));
    return re;
}
void sol(){
    int n,m;cin>>n>>m;
    priority_queue<pii,vector<pii>,greater<pii>> pq;
    memset(d,0x3f,sizeof(d));
    d[0]=0;pq.push({0,0});
    F(i,m){
        int a,b,C,D;cin>>a>>b>>C>>D;
        a--,b--;
        g[a].pb({b,{C,D}});
        g[b].pb({a,{C,D}});
    }
    while(pq.size()){
        auto [val,a]=pq.top();pq.pop();
        if(val!=d[a]) continue;
        for(auto &[b,tt]:g[a]){
            if(remin(d[b],dis(tt.first,tt.second,d[a])))
                pq.push({d[b],b});
        }
        assert(d[a]==val);
    }
    //F(i,n) cout<<d[i]<<" ";
    //cout<<"\n";
    assert(d[n-1]>=0);
    cout<<(d[n-1]>=INF_64?-1:d[n-1])<<"\n";
}
int32_t main(){
    #ifdef LOCAL
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    #endif // LOCAL
    IOS;
    int t=1;
    gen();
    //cin>>t;
    FF(i,1,t+1){
        //cout<<"Case #"<<i<<": ";
        sol();
    }
}


#include <bits/stdc++.h>
using namespace std;

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

template <typename F>
class
#if defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
  [[nodiscard]]
#endif  // defined(__has_cpp_attribute) && __has_cpp_attribute(nodiscard)
FixPoint final : private F
{
public:
  template <typename G>
  explicit constexpr FixPoint(G&& g) noexcept
    : F{std::forward<G>(g)}
  {}

  template <typename... Args>
  constexpr decltype(auto)
  operator()(Args&&... args) const
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9
  noexcept(noexcept(F::operator()(std::declval<FixPoint>(), std::declval<Args>()...)))
#endif  // !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 9
  {
    return F::operator()(*this, std::forward<Args>(args)...);
  }
};  // class FixPoint

#if defined(__cpp_deduction_guides)
template <typename F>
FixPoint(F&&)
  -> FixPoint<std::decay_t<F>>;
#endif  // defined(__cpp_deduction_guides)

namespace
{
  template <typename F>
#if !defined(__has_cpp_attribute) || !__has_cpp_attribute(nodiscard)
  #  if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 4)
__attribute__((warn_unused_result))
#  elif defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_Check_return_)
_Check_return_
#  endif  // defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#endif  // !defined(__has_cpp_attribute) || !__has_cpp_attribute(nodiscard)
  inline constexpr decltype(auto)
  makeFixPoint(F&& f) noexcept
  {
    return FixPoint<std::decay_t<F>>{std::forward<std::decay_t<F>>(f)};
  }
}  // namespace
template <typename T>
void fwt(vector<T>& f) {
  int n = f.size();
  for (int i = 1; i < n; i <<= 1) {
    for (int j = 0; j < n; j++) {
      if ((j & i) == 0) {
        T x = f[j], y = f[j | i];
        f[j] = x + y, f[j | i] = x - y;
      }
    }
  }
}
template <typename T>
void ifwt(vector<T>& f) {
  int n = f.size();
  for (int i = 1; i < n; i <<= 1) {
    for (int j = 0; j < n; j++) {
      if ((j & i) == 0) {
        T x = f[j], y = f[j | i];
        f[j] = (x + y) / 2, f[j | i] = (x - y) / 2;
      }
    }
  }
}

int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int64 N;
  cin >> N;
  int64 a = ((1 << N) - 1), b = ((1 << (N-1)) - 1);

  if (N == 1) {
    cout << 1 << endl << "AB" << endl;
    return 0;
  }

  int64 n = b / __gcd(a, b);
  int64 x = n * a / b, m = x;

  cout << x << endl;
  FOR(i, 1, x+1) {
    REP(j, 1 << N) {
      if (__builtin_popcount(i & j) % 2) cout << "A";
      else cout << "B";
    }
    cout << endl;
  }
}

#include<bits/stdc++.h>
using namespace std;
int n,siz[1<<8];
int main(){
	scanf("%d",&n);
	printf("%d\n",(1<<n)-1);
	for(int i=0;i<1<<n;i++) siz[i]=siz[i>>1]^(i&1);
	for(int i=1;i<=(1<<n)-1;i++,puts(""))
	 for(int j=0;j<(1<<n);j++)
	  putchar('A'+siz[i&j]);
	return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int         long long
#define mod         1000000007
#define FAST        ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f(i,n)      for(int i=0;i<n;i++)
#define fp(i,k,n)   for(int i=k;i<=n;i++)
#define fr(i,k,n)   for(int i=k;i>=n;i--)
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define dbg(x)      cout << (#x) << " is " << (x) << '\n'
#define F           first
#define S           second
#define sz(x)       (int)(x).size()
#define lb          lower_bound
#define ub          upper_bound
#define mems(x)     memset(x,0,sizeof(x))
#define all(a)      a.begin(),a.end()
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

/*---------------------------------------------------------------------------------------------------*/

void solve()
{
  int n;
  cin >> n;
  int a[n];
  int ans=0;
  f(i,n)
   cin >> a[i];
 f(i,n)
 {
     int minm=mod;
     fp(j,i,n-1)
     {
         minm=min(a[j],minm);
         ans=max(ans,minm*(j-i+1));
     }

 }
 cout << ans << '\n';
    return;
}

signed main()
{
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
  FAST
  int T=1;
  // cin >> T;
  while(T--)
  {
    solve();
  }
  return 0;
}

#pragma GCC optimize("O2")

#include <bits/stdc++.h>

namespace IN {
#define BUF_SIZE 1 << 17
static char buf[BUF_SIZE], *fs = buf, *ft = buf;
inline int nc() { return fs == ft && (ft = (fs = buf) + fread(buf, 1, BUF_SIZE, stdin), fs == ft) ? EOF : *fs++; }
template <typename T>
inline int rn(T &x) {
    x = 0;
    int f = 0;
    char ch = nc();
    while (ch < '0' || ch > '9') {
        if (ch == '-') f = 1;
        ch = nc();
        if (ch == EOF) return EOF;
    }
    while (ch >= '0' && ch <= '9') {
        x = x * 10 + ch - 48;
        ch = nc();
    }
    x = f ? -x : x;
    return 0;
}
template <typename T>
inline int read(T &x) {
    return rn(x);
}
template <typename T, typename... Args>
inline int read(T &x, Args &...args) {
    rn(x);
    return read(args...);
}
#undef BUF_SIZE
}  // namespace IN

namespace OUT {
template <typename T>
inline void print(std::string, T x) {
    std::cout << x << std::endl;
}
template <typename T, typename... Args>
inline void print(std::string sep, T x, Args... args) {
    std::cout << x << sep;
    print(sep, args...);
}
}  // namespace OUT
using namespace IN;
using namespace OUT;
using namespace std;

#define INF 0x3f3f3f3f
#define LL long long
#define PLL pair<LL, LL>
#define PII pair<int, int>
#define MP make_pair
#define FI first
#define SE second
#define PB push_back
#define ALL(A) A.begin(), A.end()
#define BPQ(type, name) priority_queue<type> name
#define SPQ(type, name) priority_queue<type, vector<type>, greater<type>> name
#define REP(i, n) for (LL i = 0; i < (LL)n; ++i)
#define REP1(i, n) for (LL i = 1; i <= (LL)n; ++i)
#define REP_R(i, a, b) for (LL i = (LL)a; i < (LL)b; ++i)
#define REP_RR(i, a, b) for (LL i = (LL)a; i >= (LL)b; --i)
#define SETVAL(array, val) memset(array, val, sizeof(array))
// Debug
#define DISP(arr, n)                     \
    do {                                 \
        REP(i, n) cout << arr[i] << ' '; \
        cout << endl;                    \
    } while (0)
#define DISP1(arr, n)                     \
    do {                                  \
        REP1(i, n) cout << arr[i] << ' '; \
        cout << endl;                     \
    } while (0)
#define DISP_T(arr, n, m)                       \
    do {                                        \
        REP(i, n) {                             \
            REP(j, m) cout << arr[i][j] << ' '; \
            cout << endl;                       \
        }                                       \
    } while (0)
#define DISP_T1(arr, n, m)                       \
    do {                                         \
        REP1(i, n) {                             \
            REP1(j, m) cout << arr[i][j] << ' '; \
            cout << endl;                        \
        }                                        \
    } while (0)
#define DISP_V(vec)                                \
    do {                                           \
        for (auto elem : vec) cout << elem << ' '; \
        cout << endl;                              \
    } while (0)
#define SIZE 300010

int main() {
    LL tx, ty, ta, tb;
    cin >> tx >> ty >> ta >> tb;
    __int128 x = tx, y = ty, a = ta, b = tb;
    --y;
    LL exp = 0;
    while (x * a - x < b && x * a <= y) {
        x *= a;
        ++exp;
    }
    exp += (y - x) / b;
    cout << exp << endl;
    return 0;
}


#include<iostream>
#include<vector>
using namespace std;
typedef long long li;
#define repa(i,a,n) for(int i=(a);i<(n);i++)
#define MOD 998244353
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

struct modint{
  li num;

  modint(li a=0){
    num=(a%MOD+MOD)%MOD;
  }
  modint operator+(modint a) {return{(num+a.num)%MOD};}
  modint operator-(modint a) {return{((num-a.num)%MOD+MOD)%MOD};}
  modint operator*(modint a) {return{num*a.num%MOD};}
  modint inv(const modint& a);
  modint operator/(modint a) {return (*this)*inv(a);}
  modint& operator+=(modint a) {
    (num += a.num)%=MOD;
    return *this;
  }
  modint& operator-=(modint a) {
    (num += MOD-a.num)%=MOD;
    return *this;
  }
  modint& operator*=(modint a) {
    (num*=a.num)%=MOD;
    return *this;
  }
};

std::ostream& operator<<(std::ostream& os, const modint& m){
  // ここでストリームに obj を書き込みます。
  li a=m.num;
  a%=MOD;
  a+=MOD;
  a%=MOD;
  cout << a;
  return os;
}

std::istream& operator>>(std::istream& os,modint& m){
  // ここでストリームに obj を書き込みます。
  li a; cin >>a;
  m=a;
  return os;
}

modint pow(modint a,int r){
  if(a.num==0) return 0;
  modint b=a,s=1;
  while(r){
    if(r%2) s*=b;
    b*=b;
    r/=2;
  }
  return s;
}

modint inv(modint a){
  // MOD: prime
  return pow(a,MOD-2);
}

modint f(int x,int n,modint mn,modint mx){
  modint a=(pow(x,n)-mn)*mx*mx;
  modint b=mn*mx*n;
  return a-b;
}

int main(){
  int n,m; cin >>n >>m;
  vector<modint> dp(n+3,0);
  // dp[i][j] : [M]^(i+1) で最終が(j+1) min=k のときの和

  modint ans=pow(m,n)*n-pow(m,n-2)*(n-1);

  rep(_i,n-1){
    int i=_i+1;
    rep(_x,m-1){
      int x=_x+1;
      ans-=pow(m,i-1)*pow(x,n-1-i)*i;
    }
  }

  print(ans);
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int pow(ll a,ll b, ll m){
    if(b == 0)return 1;
    ll fix = 1;
    if(b % 2 != 0){
        fix = a;
        b--;
    }
    ll tmp = pow(a, b/2, m);
    return tmp * tmp % m * fix % m;
}
int main(){
    ll n,m;
    cin >> n >> m;
    ll res = pow(10,n,m*m);
    cout << res / m << endl;
}


#include<stdio.h>
#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
//思维转化：：每堆只有一个或两个石子，每次可以取1个或两个，共N堆；
/*
int s[66];
int main(){
	int n;
	scanf("%d",&n);
	int an=0;
	int s[n];
	for(int i=0;i<n;i++){
		int now;
		scanf("%d",&now);
		//超过2为2不超过2为1
		if(now>2)an++;
	}
	if(n%2){

	}
}
*/
int main(){
	int a,b;
	scanf("%d %d",&a,&b);
	if(a-b<3&&a-b>0){
		printf("Yes");
	}else if(b-a<3&&b-a>0){
		printf("Yes");
	}else{
		printf("No");
	}
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>

using namespace std;
typedef long long ll;

int main()
{
    char s, t;
    cin >> s >> t;
    if (s == 'Y')
    {
        int temp = t - 'a' + 'A';
        cout << (char)temp << endl;
    }
    else
    {
        cout << t << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define Pint pair<int,int>
#define Pll pair<ll,ll>
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
#define pb push_back
#define eb emplace_back
template<class T>void chmax(T &a,T b){if(a<b)a=b;}
template<class T>void chmin(T &a,T b){if(a>b)a=b;}
constexpr int INF=1000000000;
constexpr ll llINF=1000000000000000000;
constexpr int mod=1000000007;
constexpr double eps=1e-8;
const double pi=acos(-1);
int dx[]={0,1,0,-1},dy[]={1,0,-1,0};
int Random(int mi,int ma){
    random_device rnd;
    mt19937 mt(rnd());//32bit
    //[mi,ma]
    uniform_int_distribution<int>engine(mi,ma);
    return engine(mt);
}
ll gcd(ll a,ll b){
    if(b==0)return a;
    return gcd(b,a%b);
}
ll lcm(ll a,ll b){
    return a/gcd(a,b)*b;
}
bool prime(int a){
    if(a==1)return false;
    for(int i=2;i*i<=a;i++){
        if(a%i==0)return false;
    }
    return true;
}
ll modpow(ll a,ll b){
    if(b==0)return 1;
    if(b%2)return modpow(a,b-1)*a%mod;
    ll memo=modpow(a,b/2);
    return memo*memo%mod;
}
vector<ll>kaijo,invkaijo;
void init_fact(int n){
    kaijo.resize(n+1);
    invkaijo.resize(n+1);
    kaijo[0]=1;
    for(ll i=1;i<=n;i++){
        kaijo[i]=kaijo[i-1]*i;
        kaijo[i]%=mod;
    }
    rep(i,n+1)invkaijo[i]=modpow(kaijo[i],mod-2);
}
vector<vector<ll>>C,sC;
void init_comb(int n,int m){
    C.resize(n+1,vector<ll>(m+1,0));
    sC.resize(n+1,vector<ll>(m+1,0));
    C[0][0]=1;
    for(int i=1;i<=n;i++){
        C[i][0]=1;
        for(int j=1;j<=m;j++){
            C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
        }
    }
    rep(i,n+1){
        rep(j,m){
            sC[i][j+1]=(sC[i][j]+C[i][j])%mod;
        }
    }
}
ll comb(int a,int b){
    if(a<b)return 0;
    if(a<0||b<0)return 0;
    return kaijo[a]*invkaijo[a-b]%mod*invkaijo[b]%mod;
}
ll inv(ll x){
    x=modpow(x,mod-2);
    return x;
}
int dp[100010];
void solve(){
    int n;
    cin>>n;
    vector<ll>a(n),b(n),c,d;
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    ll ans=0;
    for(int i=0;i<n;i+=2){
        ans+=max(a[i]+a[i+1],b[i+1]+b[i]);
        if(a[i]+a[i+1]>=b[i]+b[i+1]){
            c.pb(b[i]-a[i]);
            d.pb(b[i+1]-a[i+1]);
        }
        else{
            c.pb(a[i+1]-b[i+1]);
            d.pb(a[i]-b[i]);
        }
    }
    sort(all(d));
    sort(all(c));
    rep(i,c.size()){
        if(c[i]+d[i]>=0)ans+=c[i]+d[i];
    }
    cout<<ans<<endl;
}
int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    //int t;cin>>t;while(t--)
    solve();
    return 0;
}

//g++ t.cpp -o t && t < p.txt
//d>p.txt&&t<p.txt&&t2<p.txt

#include <iostream> // プログラムの耳と口
#include <vector> // 超有能配列秘書
#include <algorithm> // みんな大好きソートと二分探索
#include <queue> // きゅーちゃん、だいすき
#include <string> // to_string
#include <functional> // 関数を変数に入れる子
#include <set> // 値の取得・挿入・削除を高速に
#include <map> // setの妹 これまた優秀
#include <random> // 乱択さん
#include <ctime> // へびになりたい
#include <bitset> // へびになった ｼｬｰ
#include <cassert>

// #include <atcoder/all>
// using namespace atcoder; // コンパイル重い

#define DB cerr<<"D"<<endl

using namespace std; using ll=long long; using ld=long double; const int INF=1e9; const ll LINF=1e18; const double dINF = 1e18; const ld ldINF = 1e18; const double EPS = 1e-6;
using P=pair<ll,ll>;
const ll M = 1e9+7;
ll mod_pow(ll x, ll a) { ll an = 1; while(a > 0) { if (a&1) an = an * x % M; x = x * x % M; a >>= 1;} return an;}
ll mod_pow(ll x, ll a, ll m) { ll an = 1; while(a > 0) { if (a&1) an = an * x % m; x = x * x % m; a >>= 1;} return an;}
void add(ll& x, ll y) {x+=y; x%=M;}; void mul(ll& x, ll y) {x*=y; x%=M;}; template<typename T, typename U> void chmax(T& x, U y) {if (x<y) x=y;}; template<typename T, typename U> void chmin(T& x, U y) {if (x>y) x=y;} bool vaild(int x, int y, int hh, int ww){return 0<=x&&x<hh&&0<=y&&y<ww;}
ll gcd(ll a, ll b) {if (b==0) return a; else return gcd(b, a%b);}
int keta(ll a) {int res=0; while(a>0) res+=a%10, a/=10; return res;}
const int up[]={1,-1,0,0}, lf[]={0,0,1,-1};

int main() {
  int n; cin>>n;
  ll a[n],b[n];
  for(int i=0;i<n;i++) cin>>a[i];
  for(int i=0;i<n;i++) cin>>b[i];
  for(int i=1;i<n;i+=2) {
    swap(a[i],b[i]); // これにより、a[i]をn/2個とb[i]をn/2個足す問題に帰着
  }
  ll an=0;
  for(int i=0;i<n;i++) {
    an+=a[i]; b[i]-=a[i];
  }
  sort(b,b+n,greater<ll>());
  for(int i=0;i<n/2;i++) {
    an+=b[i];
  }
  cout<<an<<endl;
}
// ・配列の大きさok？　・priority_queueはgreater？　・debug消した？
// ・落ち着いて。提出まで4分待ってね……WJ……1/10……2/10……

// Thank you for making problems and running the contest


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout << fixed << setprecision(20);
#define rep(i,n) for (int i=0; i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
typedef long long ll;
using namespace std;
const ll MOD = 1e9+7LL;
const int INF = 2e9;
int a,b,x,y;

int main() {
  INCANT;
  cin >> a >> b >> x >> y;
  if (a==b) {
    cout << x << endl;
    return 0;
  }
  int ret=INF;
  ret = min(ret, abs(b-a)*y+x);
  if (a<b) {
    ret = min(ret, (abs(b-a)*2+1)*x);
  } else {
    ret = min(ret, (abs(b-a)*2-1)*x);
  }

  ret = min(ret,abs(b-(a-1))*y+x); // Aa-> A_b+1 -> Bb
  cout << ret << endl;
  return 0;
}

/////////////////////////////////TEST CASES////////////////////////////////////
/*
*/
/////////////////////////////////////CODE//////////////////////////////////////
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
//#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = a ; i > b ; i--)
#define fastio ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define PI 3.14159265
typedef long long ll;
#define vl vector<ll>
#define IN(inp) ll inp;cin>>inp;
#define pb push_back
#define all(a) a.begin(),a.end()
#define FR(i,a) for(auto &i:a)
#define rvl(a,n) vl a;FOR(i,0,n){IN(in); a.pb(in);}
#define what(A) cout<<#A<<" is "<<A<<endl;
ll MAX = 100000000000;
ll MOD = 998244353;
void solve()
{
	IN(a)IN(b)IN(x)IN(y);
	if (abs(a - b) == 0)
	{
		cout << x << endl;
	}
	else if (a > b)
	{
		if (a - b == 1)
		{
			cout << x << endl;
		}
		else
		{
			ll ans1 = (a - b - 1) * y + x;
			ll ans2 = x + (a - b - 1) * 2 * x;
			cout << min(ans1, ans2) << endl;
		}

	}
	else
	{
		if (b - a == 1)
		{
			cout << x + y << endl;
		}
		else
		{
			ll ans1 = (b - a) * y + x;
			ll ans2 = x + (b - a) * 2 * x;
			cout << min(ans2, ans1) << endl;
		}
	}

}
int main()
{
	fastio
		//freopen("input.txt", "rt", stdin);
		//freopen("output.txt", "wt", stdout);
		ll test = 1;
	//cin >> test;
	while (test--)
	{
		solve();
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> V;
#define F(N,S,E) for(int N=(int)(S);N<=(int)(E);N++)
#define R(N,S,E) for(int N=(int)(S);N>=(int)(E);N--)
#define D(N,E) for(int N=0;N<(int)(E);N++)
LL read(){LL x;scanf("%lld",&x);return x;}

const int N=2.1e5;
int a[N],b[N];

struct BIT{
	int a[N];
	void add(int x,int v){
		for(x++;x<N;x+=x&-x)a[x]+=v;
	}
	int query(int x)const{
		int ans=0;
		for(x++;x;x&=x-1)ans+=a[x];
		return ans;
	}
}tr;

map<int,V> qwq;
int p[N];
int main(){
	int n=read();
	D(i,n)a[i]=read()+i;
	D(i,n)b[i]=read()+i;
	map<int,int> cnta,cntb;
	D(i,n)cnta[a[i]]++;
	D(i,n)cntb[b[i]]++;
	if(cnta!=cntb){
		puts("-1");
		exit(0);
	}
	D(i,n){
		qwq[b[i]].push_back(i);
	}
	R(i,n-1,0){
		V &v=qwq[a[i]];
		p[i]=v.back();
		v.pop_back();
	}
	LL ans=0;
	R(i,n-1,0){
		ans+=tr.query(p[i]);
		tr.add(p[i],1);
	}
	printf("%lld\n",ans);
	return 0;
}

#include<bits/stdc++.h>
#define ll  long long int
#define ull unsigned long long
#define ff first
#define ss second
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define pb push_back
#define mp make_pair
#define inf 1000000000000000
#define mod 1000000007
#define ld long double
#define pll pair<ll,ll>
using namespace std;
ll n,timer;
vector<ll> adj[2000009];
vector<ll> euler,tin,tout;

void dfs(ll node,ll par)
{
    tin[node]=++timer;
    euler.pb(node);

    for(ll j:adj[node])
        if(j!=par)
            dfs(j,node);

    tout[node]=++timer;
    euler.pb(node);
}

void build(ll root)
{
    tin.resize(n),tout.resize(n);
    timer=-1;
    dfs(root,-1);
}

int main()
{
fast;
cin>>n;

vector<ll> ans(2*n+1,0);
vector<ll> a(n-1),b(n-1);

for(ll i=0;i<n-1;i++)
{
	cin>>a[i]>>b[i];
	a[i]--;
	b[i]--;

	adj[a[i]].pb(b[i]);
	adj[b[i]].pb(a[i]);
}

build(0);

ll q;
cin>>q;

while(q--)
{
	ll t,x,y,e,inc;
	cin>>t>>e>>inc;
	x=a[e-1],y=b[e-1];

	if(t==2)
		swap(x,y);

	if(tin[y]>tin[x])
	{
		ans[0]+=inc;
		ans[tin[y]]-=inc;
		ans[tout[y]+1]+=inc;
	}

	else
	{
		ans[tin[x]]+=inc;
		ans[tout[x]+1]-=inc;
	}
}

ll w=0;
vector<ll> res(n+10,0);
for(ll i=0;i<2*n;i++)
{
	w+=ans[i];
	res[euler[i]]+=w;
}

for(ll i=0;i<n;i++)
cout<<res[i]/2<<" "<<endl;

}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <queue>
#define int unsigned long long
using namespace std;
const int maxn=2e5+10;
struct node {
	int id,val;
}a[maxn];
int n;
signed main() {
	int now=0;
	cin>>n>>now;
	for(int i=1;i<=n;i++) {
		cin>>a[i].id>>a[i].val;
	}
	sort(a+1,a+1+n,[](node x,node y)->bool{return x.id<y.id;});
	for(int i=1;i<=n;i++) {
		if(now<a[i].id) {
			cout<<now;
			return 0;
		}
		now+=a[i].val;
	}
	cout<<now;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.14159265
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
ll n, k, ans = 0;
void solve(vector<vector<ll> > &v,set<ll> st, ll last, ll val) {
    if(st.size()  == 0) {
        val += v[last][0];
        if(val == k)    {
            ans++;
        }
        return;
    }
    for(auto itr = st.begin(); itr != st.end(); itr++)  {
        set<ll> temp = st;
        temp.erase(*itr);
        solve(v, temp, *itr, val + v[last][*itr]);
    }
    return;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n >> k;
    vector<vector<ll> > v(n, vector<ll> (n, 0));
    for(int i = 0; i < n; i++)  {
        for(int j = 0; j < n; j++ ) {
            cin >> v[i][j];
        }
    }
    set<ll> st;
    for(int i = 1; i < n; i++)  {
        st.insert(i);
    }
    ll val = 0;
    ll last = 0;
    solve(v, st, last, val);
    cout << ans;
}


#include <bits/stdc++.h>
#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define db4(x,y,z,w) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<#w<<"="<<w<<'\n'
#define vll vector< ll >
//#define M 100000
#define MD 1000000007
#define pb push_back
#define rep(i,a,b) for(ll i = a; i <= b; ++i)
#define fo(i,a,b) for(int i = a; i<= b; ++i)
#define pii pair<int,int>
#define vec(a) vector<a >
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define se second
#define fi first
#define inf 0xffffffff
#define inchar getchar_unlocked
#define outchar(x) putchar_unlocked(x)
//#define int unsigned long long
//#define endl '\n'
#define IOS ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define int long long
using namespace std;
//using ll = unsigned long long;
ll md=MD;
//ll M=1073741824;
ll M=1e9+7;
//ll exp(ll a,ll b){ll r=1;while(b>0){if(b&1){r=r*(a%md);r=(r+md)%md;}b>>=1;a=(a%md)*(a%md);a=(a+md)%md;}return (r+md)%md;}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll Min(int a,int b){if(a<b)return a; return b;}
ll Max(int a,int b){if(a>b)return a; return b;}
ll powM(ll a,ll b){if(a==1) return 1;ll ans=1;while(b>0){if(b&1)ans=(ans*a)%M;a=(a*a)%M;b=b>>1;}return ans;}
ll power(ll a,ll b){if(a==1) return 1;ll ans=1;while(b>0){if(b&1)ans=(ans*a);a=(a*a);b=b>>1;}return ans;}
const int INF=1000000000000000000;

//always try to hack ur soln before submitting (penalty-50 wrong submission 50 min sochle isse aacha)
// Abe n*m ke grid main y ke coordinates m se akm hone chahiye na ke n se

int32_t main()
{
	IOS;
	int t;
	t=1;
	while(t--)
	{
		int x,y;
		cin>>x>>y;
		cout<<(x+y)/2<<" "<<(x-y)/2<<"\n";
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template<class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
using graph = vector<VI>;
template<class T = ll> using w_graph = vector<vector<pair<int, T>>>;
#define FOR(i,a,n) for(int i=(a);i<(n);++i)
#define eFOR(i,a,n) for(int i=(a);i<=(n);++i)
#define rFOR(i,a,n) for(int i=(n)-1;i>=(a);--i)
#define erFOR(i,a,n) for(int i=(n);i>=(a);--i)
#define SORT(a) sort(a.begin(),a.end())
#define rSORT(a) sort(a.rbegin(),a.rend())
#define fSORT(a,f) sort(a.begin(),a.end(),f)
#define all(a) a.begin(),a.end()
#define out(y,x) ((y)<0||h<=(y)||(x)<0||w<=(x))
#define tp(a,i) get<i>(a)
#ifdef _DEBUG
#define line cout << "-----------------------------\n"
#define stop system("pause")
#endif
constexpr ll INF = 1000000000;
constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;
constexpr ld eps = 1e-10;
template<class T>inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; }return false; }
template<class T>inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; }return false; }
inline void init() { cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); }
template<class T>inline istream& operator>>(istream& is, vector<T>& v) { for (auto& a : v)is >> a; return is; }
template<class T, class U>inline istream& operator>>(istream& is, pair<T, U>& p) { is >> p.first >> p.second; return is; }
template<class T>inline vector<T> vec(size_t a) { return vector<T>(a); }
template<class T>inline vector<T> defvec(T def, size_t a) { return vector<T>(a, def); }
template<class T, class... Ts>inline auto vec(size_t a, Ts... ts) { return vector<decltype(vec<T>(ts...))>(a, vec<T>(ts...)); }
template<class T, class... Ts>inline auto defvec(T def, size_t a, Ts... ts) { return vector<decltype(defvec<T>(def, ts...))>(a, defvec<T>(def, ts...)); }
template<class T>inline void print(const T& a) { cout << a << "\n"; }
template<class T, class... Ts>inline void print(const T& a, const Ts&... ts) { cout << a << " "; print(ts...); }
template<class T>inline void print(const vector<T>& v) { for (int i = 0; i < v.size(); ++i)cout << v[i] << (i == v.size() - 1 ? "\n" : " "); }
template<class T>inline void print(const vector<vector<T>>& v) { for (auto& a : v)print(a); }
template<class T>inline T sum(const vector<T>& a, int l, int r) { return a[r] - (l == 0 ? 0 : a[l - 1]); }
template<class T>inline void END(T s) { print(s); exit(0); }
void END() { exit(0); }

VS s(3);
string t;
vector<bool> used(10);
VI num;
int m;
void dfs(int i) {
    if (i == m) {
        VS n = s;
        bool ng = false;
        FOR(j, 0, 3) {
            int f = lower_bound(all(t), s[j][0]) - t.begin();
            if (num[f] == 0)ng = true;
            FOR(k, 0, s[j].size()) {
                int idx = lower_bound(all(t), s[j][k]) - t.begin();
                n[j][k] = char('0' + num[idx]);
            }
        }
        if (ng)return;

        if (stoll(n[0]) + stoll(n[1]) == stoll(n[2])) {
            FOR(j, 0, 3)print(n[j]);
            END();
        }
    }
    else {
        FOR(j, 0, 10) {
            if (used[j])continue;
            used[j] = true;
            num[i] = j;
            dfs(i + 1);
            used[j] = false;
        }
    }
}
int main() {
    init();

    cin >> s;
    set<char> se;
    FOR(i, 0, 3)for (char c : s[i])se.insert(c);
    for (char c : se)t += c;
    SORT(t);
    m = t.size();
    num.resize(m);
    dfs(0);
    print("UNSOLVABLE");

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  cout << b - c << endl;
  }

#include <bits/stdc++.h>
using namespace std;
#define ff              first
#define ss              second
#define pb(x)           push_back(x)
#define mp              make_pair
#define sz(x)           (int)x.size()
#define mem(x ,y)       memset(x , y , sizeof x )
#define all(a )         a.begin() , a.end()
#define pii             pair<int,int >
#define endl            "\n"
#define forn(i,x,y )    for(int i= x; i<=y ; i++ )
#define ford(i,x,y )    for(int i= x; i>=y ; i-- )
#define rep(i,n )       for(int i= 0; i<n ; i++ )
#define repi(i,n )      for(int i= 1; i<=n ; i++ )
#define repit(i, c)     for( __typeof((c).begin()) i = (c).begin(); i != (c).end();++i )
#ifndef ONLINE_JUDGE
    #define dbg(args...)    do {   cout << #args << ' ' ;  print(args); } while(0); cerr<< endl ;
#else
    #define dbg(args...)   ;
#endif
typedef long long ll  ;
typedef unsigned long long ull  ;
ll  mod =  1e9+7, mod2 =     998244353;
int setbit(int n, int pos  ) { return n = n|(1LL<< pos) ; }
int resetbit(int n,int pos ) { return n = n & ~(1LL<<pos ); }
bool checkbit(int n,int pos) { return (bool ) (n&(1LL<<pos))  ; }
template<typename T>T add(T x, T y, T mod = mod ){ x%= mod ;  y%= mod ;   return (x+y)%mod ;  }
template<typename T>T sub(T x, T y, T mod = mod ){ return ((x-y)%mod+mod )%mod;  }
template<typename T>T mul(T x, T y, T mod = mod ){ x %= mod ; y %= mod ; return (x*y)%mod  ;  }
template<typename T> void print(const T& v) {    cout << v << ' ' ;}
template<typename T1,typename... T2> void print( const T1& first, const T2&... rest ){ print(first); print(rest...) ;}
template<typename T> void dbg_a(T a[] ,int n=10 ) {cerr << "[ "; for(int i=0;i <= n ; i++ )cerr<<a[i]<<' ' ; cerr<< " ]" <<  endl; }
template<typename F,typename S>ostream& operator<<( ostream& os, const pair< F, S > & p ){return os << "[ " << p.first << ", " << p.second << " ]";}
template<typename T>ostream &operator<<(ostream & os, const vector< T > &v ){os << "[ "; for(int i=0; i<sz(v) ; i++ )  os << v[i] << ' ' ; return os << " ]\n" ; }
template<typename T>ostream &operator<<(ostream & os, const map< T ,T> &Map ){os << "[ "; repit(it , Map ) os << "[" <<(*it).ff << ' ' << (*it).ss << "] "    ; return os << "]\n" ; }
template<typename T>ostream &operator<<(ostream & os, const set< T > &Set  ){os << "[ "; repit(it , Set ) os <<  *it  << ' ' ; return os << " ]\n" ; }
template<typename T>ostream &operator<<(ostream & os, const multiset< T > &Set) {os << "[ "; repit(it , Set )os <<  *it  << ' ' ; return os << " ]\n" ; }
#define  int  ll
const int maxn  = (int)  2e5 +  123;
const int inf  =  1e9; //0xc0  ;//0x3f ;
/////////////////////////////////////////////////

int n ,m,sum , k ;
// int a[maxn  ] , cnt  ;

void  solve() {
    int x,y,z,p,q  ,  tot = 0  , ans = 0 , mx =0 , mn     ;

    // cin >> n   ;
    // rep(i , n )  cin>> a[i  ] ;
    int a,  b , c, d ;
    cin  >> a >> b >> c >> d ;
    ans = -inf  ;
    forn(i ,a,b )forn(j , c,d  ) ans =  max(ans , i-j) ;

    cout << ans <<  endl ;

}
 //  before submit  ->  //  check case 1
signed main() {

    ios :: sync_with_stdio(false);  cin.tie(0); cout.tie(0)  ;
    cout << fixed << setprecision( 12) ;
    int t = 1 , cs =0   ;
    // cin >> t  ;
    while(t--)   {
        solve()  ;
    }
    return 0 ;
}
  //  check case 1


// Problem : C - POW
// Contest : AtCoder - AtCoder Beginner Contest 205
// URL : https://atcoder.jp/contests/abc205/tasks/abc205_c
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
using namespace std;
/* DEBUGGING */
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define deb(x...)
#endif
/* MACROS */
typedef long long int ll;

typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;

typedef map<int,int> mii;
typedef tuple<int,int,int> tup;

#define  ff          first
#define  ss          second
#define  pb          push_back
#define  IOS         ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define  lb          lower_bound
#define  ub          upper_bound
#define  all(x)      (x).begin(), (x).end()
#define  lcm(x, y)   ((x) * (y) / __gcd(x, y))
#define  ps(x,y)     fixed<<setprecision(y)<<x
#define  setbit(x)   __builtin_popcountll(x)
#define  rep(i,a,b)  for(int i=a ; i<b ; ++i)
#define  repr(i,a,b) for(int i=a ; i>=b ; --i)

/* CONSTANTS */
#define PI 3.141592653589793
const ll MOD = 1e9 + 7;
const ll INF = 1000000000;
const ll MAX_N = 2e5 + 2;

ll power(ll x, ll y)
{
	ll res = 1;
	while (y > 0)
	{
		if (y & 1)
			res = (res*x) ;
		y = y>>1;
		x = (x*x);
	}
	return res;
}

void solve(){
    ll a,b,c; cin >> a >> b >> c;
    ll val1 = abs(a);
    ll val2 = abs(b);

    if(c%2){
        if(a<=0 && b<=0){
            if(val1 < val2){
                cout << ">";
            } else if(val1 > val2){
                cout << "<";
            } else{
                cout << "=";
            }
        } else if(a<=0 && b>=0){
            if(a==b){
                cout << "=";
            } else{
                cout << "<";
            }
        } else if(a>=0 && b<=0){
            if(a==b){
                cout << "=";
            } else{
                cout << ">";
            }
        } else{
            if(val1 > val2){
                cout << ">";
            } else if(val1 < val2){
                cout << "<";
            } else{
                cout << "=";
            }
        }
    } else{
        if(val1 < val2) cout << "<";
        else if(val1 > val2) cout << ">";
        else cout << "=";
    }
}

int main(){
    IOS;
    solve();
}

#include <bits/stdc++.h>
using namespace std;
#include <string>

int main(void){
  double R,X,Y,d;
  cin>>R>>X>>Y;
  d=sqrt(X*X+Y*Y);
  if(R>d){
    cout<<2;
  }else{
    cout<<ceil(d/R);
  }
}