#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
//#include <fstream>
#include <string>
#include <math.h>
#include <set>
#include <string>
#include <bitset>
//#include <fstream>
//#include <stack>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
//typedef pair<ll, P> T;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define revrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define f first
#define s second
#define pb push_back

ll mod = 1000000007;
const ll INF = 100000000000010000;
//const ull B = 998244353;
//ll kai[3010];

//void pres(double A, ll x = 20) { printf("%.20f\n", x); }

vector<ll> dx = { 0, 1, 0, -1, 1, -1, 1, -1, 0};
vector<ll> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0};

void chmin(ll& x, ll y) {
	x = min(x, y);
}

void chmax(ll& x, ll y) {
	x = max(x, y);
}

ll pow_long(ll x, ll y) {
	ll res = 1;
	while (y > 0) {
		if (y % 2 == 1) res *= x;
		x *= x;
		y /= 2;
	}
	return res;
}

void test() {
	cout << "888888888888888888888888" << endl;
}

ll gcd(ll x, ll y) {
	if (y == 0) return x;
	return gcd(y, x % y);
}

ll pow_mod(ll x, ll k) {
	x %= mod;
	ll res = 1;
	while (k > 0) {
		if (k % 2) {
			res *= x; res %= mod;
		}
		x *= x; x %= mod;
		k /= 2;
	}
	return res;
}

ll div_mod(ll x) {
	return pow_mod(x, mod - 2);
}

//コンビネーション
const int MAXcomb = 1000010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAXcomb; i++) {
		fac[i] = fac[i - 1] * i % mod;
		inv[i] = mod - inv[mod%i] * (mod / i) % mod;
		finv[i] = finv[i - 1] * inv[i] % mod;
	}
}
ll comb(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * finv[k] % mod * finv[n - k] % mod;
}

ll N, X;
vector<ll> vec;

void solve() {
    cin >> N >> X;
	rep(i, N) {
		int a;
		cin >> a;
		if (a == X) continue;
		vec.push_back(a);
	}
	//sort(vec.begin(), vec.end());
	rep(i, vec.size()) {
		cout << vec[i] << ' ';
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll T = 1;
	//cin >> T;
	rep(i, T) solve();
}

//                        YATIN KWATRA

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

#define ll                      long long
#define ar                      array
#define sz(v)                   (int)(v.size())
#define inf                     1e18
#define int                     ll
#define FIO                     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ld                      long double
#define ull                     unsigned long long
#define endl                    "\n"
#define fo(i,a,b)               for(int i = a; i<=b ; i++)
#define rfo(i,a,b)              for(int i = a; i>=b ; i--)
#define vii                     vector<int>
#define pq                      priority_queue
#define uomii                   unordered_map<int,int,best_hash>
#define all(v)                  v.begin(),v.end()
#define mp                      make_pair
#define pb                      push_back
#define pob                     pop_back
#define ff                      first
#define ss                      second
#define pii                     pair<int,int>
#define mii                     map<int,int>
#define vvii                    vector<vii>
#define mod                     1000000007
#define MIN                     -1e9
#define pi                      3.1415926535897932384626433832795
#define cz(x)                   63 - __builtin_clzll(x)

using namespace std;
using namespace __gnu_pbds;
template<class T> using oset =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

struct best_hash {
  static uint64_t splitmix64(uint64_t x) {

    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }

  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};

void INPUT()
{
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

/*
----------------------------------------------------------------
   -> Check For Overflows
   -> Out of Bounds
   -> Initialisations of global arrays and variables
----------------------------------------------------------------
*/

// so we will run all possible ways, as only two directions are allowed
// dp[turn][i][j] -> turn == 0 means tak turn and 1 means aoki turn
// we always the score difference between tak and aoki

// we maintain the score difference
// aoki tries to minimise
// tak tries to maximise

const int N = 2005;
int v[N][N];
int dp[2][N][N];
int n, m;

int khelo(int turn, int i, int j) {
  if (i == n - 1 and j == m - 1) return 0; // khel laye boht, chalo vapis
  int &ans = dp[turn][i][j];
  if (ans != -1e18) return ans;
  ans = -1e9;
  if (j + 1 < m) ans = max(ans, v[i][j + 1] - khelo(!turn, i, j + 1));
  if (i + 1 < n) ans = max(ans, v[i + 1][j] - khelo(!turn, i + 1, j));
  return ans;
}

void solve()
{
  cin >> n >> m;
  fo(i, 0, n - 1) {
    fo(j, 0, m - 1) {
      char ch;
      cin >> ch;
      if (ch == '+') v[i][j] = 1;
      else v[i][j] = -1;
      dp[0][i][j] = dp[1][i][j] = -1e18;
    }
  }

  int score = khelo(0, 0, 0);
  if (score > 0) cout << "Takahashi\n";
  else if (score < 0) cout << "Aoki\n";
  else cout << "Draw\n";
}

signed main() {

  FIO
  INPUT();

  int t;
  t = 1;
  //cin >> t;
  fo(i, 0, t - 1) {
    solve();
  }
  return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<string.h>
#include<numeric>
#include<vector>
#include<math.h>
#include<map>
using namespace std;
#define dude             ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mesc(number,character)   char f[number];memset(f,character,number);
#define mesi(number,value)   int f[number];memset(f,value,number);
#define specio           ifstream cin("input.txt");ofstream cout("output.txt");
#define fr(i,start,end)  for(i=start;i<=end;i++)
#define rf(i,start,end)  for(i=start;i>=end;i--)
#define st(vect)       sort(v.begin(),v.end())
#define tst              int t;cin>>t;while(t--)
#define ai               ll n,j,i;cin>>n;ll a[n+1];
#define pi               3.14159265358979323846
#define ll               long long int
#define acc              accumulate
#define ld               long double
#define pb               push_back
#define r0               return 0;
#define pp               pop_back
#define vec              vector
#define sec              second
#define S                string
#define D                double
#define len              length
#define br               break;
#define wh               while
#define fs               first
#define F                float
#define gcd              __gcd
#define sz               size
#define endl              "\n"
#define sp               " "
ll tim(S s) {
    ll val=0;
    val+=(s[0]-48)*600;
    val+=(s[1]-48)*60;
    val+=(s[3]-48)*10;
    val+=(s[4]-48);
    return val;
}
void sagnik(){
ai
ll b[n];
ll  ans=INT_MAX;
fr(i,0,n-1) {
    cin>>a[i]>>b[i];
}
fr(i,0,n-1) {
   fr(j,0,n-1) {
       if(i!=j) {
           ans=min(ans,max(a[i],b[j]));
       }
       else {
           ans=min(ans,(a[i]+b[i]));
       }
   }
}
cout<<ans<<endl;
}
int main(){
   // dude
   // tst {
   sagnik();
   // }
    r0;
}

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

const int maxn = 5010;
const int mod = 998244353;

int add (int x, int y) {return x + y >= mod ? x + y - mod : x + y;}
int sub (int x, int y) {return x - y < 0 ? x - y + mod : x - y;}
int mul (int x, int y) {return 1LL * x * y % mod;}
int qpm (int x, int y)
{
    int r = 1;
    while (y)
    {
        if (y & 1) r = mul (r, x);
        x = mul (x, x);
        y >>= 1;
    }
    return r;
}

int n, m;
int s[maxn][maxn], dp[maxn][maxn], ans = 0, _m[maxn];

int main()
{
    scanf ("%d %d", &n, &m);
    _m[0] = 1;
    for (int i = 1; i <= n; i++) _m[i] = mul (_m[i - 1], m);
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            int temp = _m[i - 1];
            dp[i][j] = s[i - 1][j];
            s[i][j] = add (mul (s[i - 1][j], m - j), temp);
        }
    }
    for (int i = 1; i <= n; i++)
    {
        int temp = 0;
        for (int j = 1; j <= m; j++)
            temp = add (temp, dp[i][j]);
        ans = add (mul(sub (_m[i], temp), _m[n - i]), ans);
    }
    printf ("%d\n", ans);
	return 0;
}


//#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
#include <bits/stdc++.h>
#include<set>
#include <array>
using namespace std;
#define ll long long
#define endl '\n'
#define mod 998244353
#define pb push_back
#define ff first
#define ss second
#define con continue
#define ub upper_bound
#define lb lower_bound

#define si(x) int(x.size())
#define sum_all(a)     ( accumulate ((a).begin(), (a).end(), 0ll))
#define mine(a)    (*min_element((a).begin(), (a).end()))
#define maxe(a)    (*max_element((a).begin(), (a).end()))
#define mini(a)    ( min_element((a).begin(), (a).end()) - (a).begin())
#define maxi(a)    ( max_element((a).begin(), (a).end()) - (a).begin())
#define lowb(a, x) ( lower_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define uppb(a, x) ( upper_bound((a).begin(), (a).end(), (x)) - (a).begin())
const double pi = 2 * acos(0.0);
const int dx[] = { -1, 0, 1, 0 };
const int dy[] = { 0, -1, 0, 1 };

const int dx8[] = { -1, 0, 1, 0,1,1,-1,-1 };
const int dy8[] = { 0, -1, 0, 1,1,-1,1,-1 };

ll min(ll a,ll b)
{
    if(a<b)return a;
    return b;
}
ll max(ll a,ll b)
{
    if(a>b)return a;
    return b;
}
ll ceil1(ll a,ll b)
{
    return(a+b-1)/b;
}
void read(vector<ll> & arr)
{
  for(ll i=0;i<si(arr);i++)
    cin >> arr[i];

}

void read_graph(vector<vector<ll>>& g, ll m)
{
  while(m--)
  {
    ll x,y; cin >> x>> y ;
    x--,y--;
    g[x].pb(y);
    g[y].pb(x);
  }
}
ll modmul(ll x, ll y, ll m=mod)
{
    if (y==0) return 0;
    ll a = modmul(x, y / 2, m) % m;
    a = (a + a) % m;
    if (y % 2 != 0)
    {
        a = (a + x) % m;
    }
    return a;
}
 ll power(ll a, ll b, ll m)
{
    if (b == 1) return a;
    ll x = power(a, b / 2, m);
    x *= x;
    x %= m;
    if (b % 2 == 1)
    {
        x *= a;
        x %= m;
    }
    return x;
}
void solve()
{
int n;
cin >> n ;
vector<ll> arr(n);
for(int i=0;i<n;i++)
cin >> arr[i];

sort(arr.begin(),arr.end());
// for(ll i=0;i<n;i++) cout << arr[i]  << " " ;
  // cout << endl ;
vector<ll> suff(n);
vector<ll> pw(n+1);
pw[0]=1;
for(ll i=1;i<=n;i++)
{
   pw[i]=pw[i-1]*2;
   pw[i]%=mod;
}

for(ll i=0;i<n;i++)
{
   suff[i]= modmul(arr[i],pw[i],mod);
   suff[i]%=mod;
}
for(ll i=n-2;i>=0;i--)
{
  suff[i] +=suff[i+1];
  suff[i]%=mod;
}
ll inv_2= power(2,mod-2,mod);
ll base=inv_2;
// ll k =853983 *853983 ;
ll ans=0 ;

for(ll i=0;i<n;i++)
{
   ans+=(modmul(arr[i],arr[i]))%mod;
   ans%=mod;
}
for(ll i=0;i<n-1;i++)
{
  ll x ;
  x= modmul(suff[i+1],inv_2);
  x=modmul(arr[i],x);
  ans+=x;
  ans%=mod;
  inv_2= modmul(inv_2,base);
}
cout << ans <<endl;

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
   // int t; cin >> t; while (t--)
    solve();

}

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ALL(a) (a).begin(),(a).end()
#define sz(x) int(x.size())
using namespace std;
using ll = long long;
using P = pair<int,int>;
using T = tuple<int,int,int>;
using Graph = vector<vector<int>>;
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; }
constexpr ll TEN(int n){ return (n == 0) ? 1 : 10 * TEN(n - 1); }

ll MOD = 998244353;

int main(){
    int n; cin >> n;
    vector<ll> a(n);
    rep(i,n) cin >> a[i];
    sort(ALL(a));
    vector<ll> dp(n,0); //答え
    vector<ll> sum(n);
    sum[0] = a[0];
    rep(i,n-1) {
        sum[i+1] = (sum[i]*2+a[i+1]) % MOD;
    }

    (dp[0] = a[0]*a[0]) %= MOD;
    for(int i = 1; i < n;++i){
        dp[i] += dp[i-1];
        (dp[i] += (a[i]*a[i])%MOD) %= MOD;
        (dp[i] += (sum[i-1]*a[i])%MOD) %= MOD;
    }
    cout << dp[n-1] << endl;
}


#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<map>
#include<set>
#include<vector>
#include<functional>
#include <random>
#include<iostream>
#include<iomanip>

using namespace std;

int main() {
	int N, M;
	int state[1000];
	cin >> N >> M;
	for (int i = 0; i < 1000;i++) {
		state[i] = 0;
	}
	for (int i = 0; i < N; i++) {
		int A;
		cin >> A;
		state[A - 1] += 1;
	}
	for (int i = 0; i < M; i++) {
		int B;
		cin >> B;
		state[B - 1] += 1;
	}
	for (int i = 0; i < 1000; i++) {
		if (state[i] == 1) {
			cout << i + 1 << " ";
		}
	}
}

#include<bits/stdc++.h>
#include<iostream>
#include<set>
#include<map>
#include<iterator>
#define ll              long long
#define lli             long long int
#define pb              push_back
#define mp              make_pair
#define RIP(i,n)        for(ll i=0; i<n; i++)
#define F(i,a,b)        for(int i=a; i<b; i++)
#define RIP1(i,n)       for(int i=(n-1); i>=0; i--)
#define FOR(i,a,b)      for(int i=a;i<(b); i++)
#define FOR1(i,a,b)     for(int i=a; i>=(b); i--)
#define sc(a)           scanf("%lld",&a)
#define SC(a)           scanf("%d",&a)
#define cin(a)          cin >> a
#define cout(a)         cout << a
#define pi              acos(-1)
#define pr(a)           printf("%lld\n",a)
#define PR(a)           printf("%lld ",a)
#define s(a,b)          sort(a,b)
#define sz(x)           (int)(x).size()
#define nl              '\n'
#define Max             10000
#define mod             1e9+7
using namespace std;
void F_I_O()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
ll gcd(ll a,ll b)
{
    if(b==0)
    {
        return a;
    }
    else
    {
        return gcd(b,a%b);
    }
}
int main()
{
    ll n,m;
    cin >> n >> m;
    vector<ll>a(n),b(m);
    vector<ll>cnt_a(Max,0),cnt_b(Max,0);
    vector<ll>ans;
    RIP(i,n)
    {
        cin >> a[i];
        cnt_a[a[i]]++;
    }
    RIP(i,m)
    {
        cin >> b[i];
        cnt_a[b[i]]++;
    }
    RIP(i,n)
    {
        if(cnt_a[a[i]]==1)
        {
            ans.pb(a[i]);
        }
    }
    RIP(i,m)
    {
         if(cnt_a[b[i]]==1)
        {
            ans.pb(b[i]);
        }
    }
    sort(ans.begin(),ans.end());
    RIP(i,ans.size())
    {
        cout << ans[i] << ' ';
    }
    cout << nl;
 /* ll a,b,c;
    cin >> a >> b >> c;
    double p = (b*c)/a*1.0;
    ll r = p;

    if(b%a==0 || c%a==0)
    {
        p--;
    }
    cout << max(p,0LL) << nl;*/
   /* ll a,b;
    cin >> a >> b;
    ll ans=1;
    for(ll i=2; i<=a; i++)
    {
       ll r = a/i + !(a%i==0);
        ll p = r*i;
        ll q = (r+1)*i;
        if(p<b && q<=b)
        {
            ans = max(ans,i);
        }
    }
    cout << ans << nl;*/
}


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

#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(f,c,...) (([&](decltype((c)) cccc) { return (f)(std::begin(cccc), std::end(cccc), ## __VA_ARGS__); })(c))
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;
}

void solve(long long N, std::vector<long long> x){
	i64 ans1 = 0, ans3 = 0;
	double ans2 = 0;
	REP (i, N) {
		i64 x_abs = abs(x.at(i));
		ans1 += x_abs;
		ans2 += x_abs * x_abs;
		ans3 = max(abs(ans3), x_abs);
	}
	cout << ans1 << endl;
	ans2 = sqrt(ans2);
	cout << fixed << setprecision(15) << ans2 << endl;
	cout << ans3 << endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> x(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&x[i]);
    }
    solve(N, std::move(x));
    return 0;
}

#include<iostream>
#include<cstring>
#include<cassert>
#include<cmath>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<vector>
#include<time.h>
#include<bitset>
#include<cstdio>
#include<algorithm>
using namespace std;
#define REP(i,x,y) for(int i=x;i<=y;i++)
#define rep(i,n) REP(i,1,n)
#define rep0(i,n) REP(i,0,n-1)
#define repG(i,x) for(int i=pos[x];~i;i=e[i].next)
#define ll long long
#define db double
const int N=4e5+7;
const int INF=1e9+7;
int n;
vector<int>E[N];
bool vis[N];
int sz[N];
bool dfs(int x,int f){
	bool d=0;
	vis[x]=1;
	sz[x]=1;
	for(int i=0;i<E[x].size();i++){
		if(vis[E[x][i]]){
			if(E[x][i]!=f)d=1;
		}
		else{
			d|=dfs(E[x][i],x);
			sz[x]+=sz[E[x][i]];
		}
	}
	return d;
}
int main(){
	scanf("%d",&n);
	rep(i,n){
		int x,y; scanf("%d%d",&x,&y);
		E[x].push_back(y);
		E[y].push_back(x);
	}
	int ans=0;
	rep(i,400000){
		if(vis[i])continue;
		if(!E[i].size())continue;
		bool q=dfs(i,0);
		ans+=(sz[i]-(!q));
	}
	printf("%d\n",ans);
	return 0;
}


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

// 定義
typedef long long         ll;
typedef pair<ll, ll>      P;
#define ALL(x)            (x).begin(),(x).end()
#define REP(i, n)         for(ll i = 0 ; i < (ll)n ; ++i)
#define REPN(i, m, n)     for(ll i = m ; i < (ll)n ; ++i)
#define VL                vector<ll>
#define VVL               vector<vector<ll>>
#define VVVL              vector<vector<vector<ll>>>
#define INF               (ll)2e9
#define INF_LL            1LL<<60
//#define MOD             998244353
#define MOD               1000000007

ll Ceil(ll val, ll div)   { return (val + div - 1) / div; }
ll CeilN(ll val, ll div)  { return Ceil(val, div) * div; }
ll FloorN(ll x, ll n)     { return (x - x % n); }
bool IsOdd(ll x)          { return ((x & 1) == 1); }
bool IsEven(ll x)         { return ((x & 1) == 0); }

#define POS_MAX	((ll)2e5 + 5)
ll N, M;
VVL G(POS_MAX * 2);
VVL isUsed(POS_MAX * 2);

void dfs(ll x, ll y, ll cIdx)
{
	VL &posC = G[y];

	isUsed[y][cIdx] = true;

	ll xEnd;
	if (cIdx < posC.size() - 1) {
		xEnd = posC[cIdx + 1];
	} else {
		xEnd = N * 2 + 5;
	}

	auto execOne = [&](ll yNext) {
		VL &xNext = G[yNext];
		VL &isUsedOne = isUsed[yNext];
		ll i = upper_bound(ALL(xNext), x) - xNext.begin();
		for (; i < xNext.size(); i++) {
			if (!isUsedOne[i]) {
				if (x < xNext[i] && xNext[i] <= xEnd) {
					dfs(xNext[i], yNext, i);
				} else {
					break;
				}
			}
		}
	};

	execOne(y - 1);
	execOne(y + 1);
}

// 処理
void Solve()
{
	cin >> N >> M;
	REP(i, M) {
		ll x, y;
		cin >> x >> y;
		y -= N;
		if (-POS_MAX < y && y < POS_MAX) {
			y += POS_MAX;
			G[y].emplace_back(x);
			isUsed[y].emplace_back(false);
		}
	}

	isUsed[POS_MAX].emplace_back(false);
	G[POS_MAX].emplace_back(0);
	for (auto &g : G) {
		if (g.size()) {
			sort(ALL(g));
		}
	}

	dfs(0, POS_MAX, 0);

	ll ans = 0;
	for (auto u : isUsed) {
		if (u.size()) {
			if (u.back()) {
				ans++;
			}
		}
	}

	cout << ans << endl;
}

// メイン
int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Solve();
	return 0;
}

#include<cstdio>
#include<functional>
#include<utility>
#include<algorithm>
#include<set>
using namespace std;
using ll = long long;
using ull = unsigned long long;

int main(){
    int N, M;
    scanf("%d %d", &N, &M);
    pair<int, int> pawn[M];
    for (unsigned i = 0; i < M; i++) scanf("%d %d", &pawn[i].first, &pawn[i].second);
    set<int> valid_y;
    valid_y.insert(N);
    sort(pawn, pawn + M);
    bool pawn_exists_in_front = false, pawn_exists_in_left;
    for(unsigned i = 0;i < M;i++){
        pawn_exists_in_left = pawn_exists_in_front;
        pawn_exists_in_front = (valid_y.find(pawn[i].second) != valid_y.end()) && i < M-1 && pawn[i+1] == make_pair(pawn[i].first, pawn[i].second + 1);
        if(((i && pawn[i-1] == make_pair(pawn[i].first, pawn[i].second - 1)) ? pawn_exists_in_left : (valid_y.find(pawn[i].second - 1) != valid_y.end())) || (valid_y.find(pawn[i].second + 1) != valid_y.end())) valid_y.insert(pawn[i].second);
        else valid_y.erase(pawn[i].second);
    }
    printf("%u\n", valid_y.size());
	return 0;
}


#include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
    #include <atcoder/all>
    using namespace atcoder;
#endif

using namespace std;
using Graph = vector<vector<int>>;
using vst= vector<string>;
using vin= vector<int>;
using ll=long long;
using ull=unsigned long long;
using vll= vector<ll>;
using P=pair<int ,int>;
//const long double pi=acos(-1);
#define ft first
#define sd second
#define fn front
#define pb push_back
#define eb emplace_back
#define it insert
#define vvi vector<vector<int>>
#define si(v) int((v).size())
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rell(i,n) for (ll i=0; i< (ll)(n); i++)
#define sot(x) sort(x.begin(), x.end())
#define rese(x) reverse(x.begin(), x.end())
#define gsot(x) sort(x.begin(), x.end(), greater<ll>());
#define vnn(x,y,s,name) vector<vector<int>> name(x, vector<int>(y,s))
#define mse(x) memset(x, 0, sizeof(x)
#define all(x) (x).begin(),(x).end()
#define mii(x,y,z) min(x,min(y,z))
#define maa(x,y,z) max(x,max(y,z))
#define cps CLOCKS_PER_SEC
#define yes cout<<"Yes"<<"\n"
#define no cout<<"No"<<"\n"
#define cset(x) cout<<fixed<<setprecision(x)
//const int INF=1001001001;
//998244353  1000000007

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n,m;
   cin>>n>>m;
   vector<P> a(m);
   rep(i,m){
       cin>>a[i].ft>>a[i].sd;
       a[i].ft--; a[i].sd--;
   }
   int k;
   cin>>k;
   vector<P> c(k);
   rep(i,k){
       cin>>c[i].ft>>c[i].sd;
       c[i].ft--; c[i].sd--;
   }
   int ans=0;
   int l=(1<<17);
   rep(i,l){
       bitset<17> s(i);
       vector<bool> d(n,0);
       rep(j,k){
           if(s[j]) d[c[j].ft]=true;
           else d[c[j].sd]=true;
       }
       int cnt=0;
       rep(j,m){
           if(d[a[j].ft]&&d[a[j].sd]) cnt++;
       }
       if(cnt>ans) ans=cnt;
   }
   //cout<<l<<endl;
   cout<<ans<<endl;
}

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<string>
#include<set>
#define ll long long
using namespace std;

int main(){
    int n,m;
    cin>>n>>m;
    vector<int> a(m),b(m);
    for(int i=0;i<m;i++){
        cin>>a[i]>>b[i];
    }
    int k;
    cin>>k;
    vector<int> c(k),d(k);
    for(int i=0;i<k;i++){
        cin>>c[i]>>d[i];
    }
    int ans=0;
    for(int bit=0;bit<(1<<k);bit++){
        vector<bool> v(n,false);
        for(int i=0;i<k;i++){
            if(bit & (1<<i)){
                v[c[i]]=true;
            }else{
                v[d[i]]=true;
            }
        }
        int cnt=0;
        for(int i=0;i<m;i++){
            if(v[a[i]]==true && v[b[i]]==true) cnt++;
        }
        ans=max(ans,cnt);
    }
    cout<<ans<<endl;
    return 0;
}


#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, s, n) for (int i = (s); i < (n); ++i)
#define all(a) a.begin(), a.end()
#define len(x) (int)(x).size()
#define dup(x, y) (((x) + (y)-1) / (y))
#define pb push_back
#define Field(T) vector<vector<T>>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  long N;
  cin >> N;
  for (long i = 1, a = 3; a < N; i++, a *= 3) {
    for (long j = 1, b = 5; b < N; j++, b *= 5) {
      if (a + b == N) return cout << i << " " << j << "\n", 0;
    }
  }
  cout << -1 << endl;
  return 0;
}

template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

#include<bits/stdc++.h>
#define ll long long int
#define dd double
using namespace std;
const ll MOD = 1e9 + 7;

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll n;
  cin>>n;
  ll sum=0;
  ll i=0;
  for(i=1;i<=n;i++){
  	sum=sum+i;
//  	cout<<sum<<endl;
   if(sum>=n){
   	break;
   }
  }

  cout<<i<<endl;

  return 0;
}


//#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
#include <bits/stdc++.h>
#include<set>
using namespace std;
#define ll long long
#define endl '\n'
#define pb push_back
#define ff first
#define ss second

#define si(x) int(x.size())
#define sum_all(a)     ( accumulate ((a).begin(), (a).end(), 0ll))
#define mine(a)    (*min_element((a).begin(), (a).end()))
#define maxe(a)    (*max_element((a).begin(), (a).end()))
#define mini(a)    ( min_element((a).begin(), (a).end()) - (a).begin())
#define maxi(a)    ( max_element((a).begin(), (a).end()) - (a).begin())

void solve()
{

  ll n ;
  cin >>n ;
  if(n==1)
  {
  	 cout << 1<< endl << 1 << endl; return ;
  }
  if(n==2)
  {
  	 cout << 2 << endl << 1<< endl << 1 << endl; return ;
  }
  vector<ll> f;
  f={1,1};
  while(f.back()<1e18)
  {
  	f.pb(f[si(f)-1]+f[si(f)-2]);
  }
  // for(ll i=0;i<5;i++) cout << f[i] << " ";
  	// cout << endl;
  vector<ll> ans;
vector<ll> temp;
  while(n>0)
  {
  	ll x=0;
    for(ll i=0;i<si(f);i++)
    {
      if(n>=f[i]) x=i;
    }
    ans.pb(x+1);
    n-=f[x];
  }
  vector<ll> res;

  // for(ll i=0;i<si(ans);i++) cout << ans[i]<< endl;
  if(ans[0]%2==0)
  {
  	res.pb(2);
     for(ll i=1;i<ans[0];i++)
     {
     	if(i%2==1) res.pb(3); else res.pb(4);
     }
     vector<ll> fin;
     ll j=si(ans)-1;
     for(ll i=si(res)-1;i>=0;i--)
     {
       fin.pb(res[i]);
       if(j>=1 and ans[0]-ans[j]==i)
       {
       	if(fin.back()==3)
       	  fin.pb(1);
       	else fin.pb(2);
       	j--;

       }

     }
     reverse(fin.begin(),fin.end());
     cout << si(fin) << endl;
     for(ll i=0;i<si(fin);i++)
     {
     	cout <<fin[i] << endl ;
     }

  }
  else
  	 {
  	 	res.pb(1);
     for(ll i=1;i<ans[0];i++)
     {
     	if(i%2==1) res.pb(4); else res.pb(3);
     }
      vector<ll> fin;
     ll j=si(ans)-1;
     for(ll i=si(res)-1;i>=0;i--)
     {
       fin.pb(res[i]);
       if(j>=1 and ans[0]-ans[j]==i)
       {
       	if(fin.back()==3)
       	  fin.pb(1);
       	else fin.pb(2);
       	j--;

       }

     }
     reverse(fin.begin(),fin.end());

     cout << si(fin) << endl;
     for(ll i=0;i<si(fin);i++)
     {
     	cout <<fin[i] << endl ;
     }
  	 }

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    //int t; cin >> t; while (t--)
    solve();

}

#include <bits/stdc++.h>
        #include <math.h>

        using namespace std;
        typedef long long ll;
        typedef unsigned long long ull;
        # define M_PI  3.14159265358979323846

        const int M=1e9+7;
        long long mod(long long x){
            return ((x%M + M)%M);
        }
        long long add(long long a, long long b){
            return mod(mod(a)+mod(b));
        }
        long long mul(long long a, long long b){
            return mod(mod(a)*mod(b));
        }
long long gcd(long long int a, long long int b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}

// Function to return LCM of two numbers
long long lcm(int a, int b)
{
    return (a / gcd(a, b)) * b;
}

        ll modPow(ll a, ll b){
            if(b==0)
                return 1LL;
            if(b==1)
                return a%M;
            ll res=1;
            while(b){
                if(b%2==1)
                    res=mul(res,a);
                a=mul(a,a);
                b=b/2;
            }
            return res;
        }

void solve()
{
    int n;
    cin>>n;
    vector<int>v;
    for(int i=0;i<pow(2,n);i++)
    {
        int k;
        cin>>k;
        v.push_back(k);
    }
    int i1=0;
    int ml=0;
    int mr=0;
    int i2=0;
    for(int i=0;i<pow(2,n-1);i++)
    {
        ml=max(ml,v[i]);
        if(ml==v[i])
        {
            i1=i;
        }
    }
    for(int i=pow(2,n-1);i<pow(2,n);i++)
    {
        mr=max(mr,v[i]);
        if(mr==v[i])
        {
            i2=i;
        }
    }
    if(ml<mr)
    cout<<i1+1<<endl;
    else
    cout<<i2+1<<endl;
}

 int main(){
            ios::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            cout<<fixed;
            cout<<setprecision(10);
            int t=1;
            // cin>>t;
            for(int i=1;i<=t;i++){
            //    cout<<"Case #"<<i<<": ";
                solve();
            }
            return 0;
        }


#include <bits/stdc++.h>

using namespace std;

struct DSU {
    vector<int> ps;
    DSU(int n): ps(n) {
        iota(ps.begin(), ps.end(), 0);
    }
    int find(int i) {
        if (ps[i] == i) {
            return i;
        }
        return ps[i] = find(ps[i]);
    }
    bool merge(int i, int j) {
        i = find(i);
        j = find(j);
        if (i == j) {
            return false;
        }
        ps[i] = j;
        return true;
    }
};

void solve() {
    int h, w;
    cin >> h >> w;
    DSU dsu(h + w);
    for (auto [i, j] : vector<pair<int, int>>{{0, w}, {0, w+h-1}, {w-1, w}, {w-1, w+h-1}}) {
        dsu.merge(i, j);
    }
    for (int i = 0; i < h; ++i) {
        string s;
        cin >> s;
        for (int j = 0; j < w; ++j) {
            if (s[j] == '#') {
                dsu.merge(w + i, j);
            }
        }
    }
    set<int> a, b;
    for (int i = 0; i < w; ++i) {
        a.insert(dsu.find(i));
    }
    for (int i = 0; i < h; ++i) {
        b.insert(dsu.find(w + i));
    }
    int answer = min(a.size(), b.size()) - 1;
    cout << answer << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    solve();
    return 0;
}

#include <bits/stdc++.h>
#define Ri register int
#define ll long long
#define db double
#define FOR(i, j, k) for(Ri i = j; i <= k; i++)
#define DEC(i, j, k) for(Ri i = j; i >= k; i--)
using namespace std;

const int maxn = 2e5 + 100;
int n;
vector<int> g[maxn];
int mx, xm;

int d[maxn];
inline void dfs(int u, int fa) {
	d[u] = d[fa] + 1;
	if(d[u] > mx) mx = d[u], xm = u;
	for(Ri i = 0; i < g[u].size(); i++) {
		if(g[u][i] == fa) continue;
		dfs(g[u][i], u);
	}
}

bool f[maxn];
void tagi(int u) {
	if(!u) return;
	f[u] = 1;
	for(Ri i = 0; i < g[u].size(); i++) {
		if(d[g[u][i]] < d[u]) {
			tagi(g[u][i]);
			break;
		}
	}
}

int out[maxn];
int sol(int u, int fa, int w) {
	out[u] = ++w;
	int h = 0;
	for(Ri i = 0; i < g[u].size(); i++) {
		if(g[u][i] == fa) continue;
		if(f[g[u][i]]) {h = g[u][i]; continue;}
		w = sol(g[u][i], u, w) + 1;
	}
	if(h) w = sol(h, u, w);
	return w;
}

int main() {
	scanf("%d", &n);
	FOR(i, 2, n) {
		int x, y;
		scanf("%d%d", &x, &y);
		g[x].push_back(y);
		g[y].push_back(x);
	}
	mx = 0, xm = 0;
	dfs(1, 0);
	int w = xm;
	mx = 0, xm = 0;
	dfs(w, 0);
	tagi(xm);
	sol(w, 0, 0);
	FOR(i, 1, n) printf("%d ", out[i]);
	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <map>
#include <vector>

struct segTree{
	int value[800010];
	void setValue(int ind ,int val, int l=1, int r=200000, int v=1)
	{
		if(l==r) value[v] = val;
		else
		{
			int h = (l+r)/2;
			if(ind<=h) setValue(ind,val,l,h,2*v);
			else setValue(ind,val,h+1,r,2*v+1);
			value[v] = value[2*v]+value[2*v+1];
		}
	}
	int getSum(int L, int R, int l=1, int r=200000, int v=1)
	{
		if(L>R) return 0;
		if(L<=l&&r<=R) return value[v];
		else if(r<L) return 0;
		else if(R<l) return 0;
		else
		{
			int h = (l+r)/2;
			int s1 = getSum(L,R,l,h,2*v);
			int s2 = getSum(L,R,h+1,r,2*v+1);
			return s1+s2;
		}
	}
}T;

std::vector<int> index;
std::map<int,int> hash;

std::vector<int> V[200010];
int x[200010],y[200010];
int main()
{
	int a;
	scanf("%d",&a);
	for(int i=1;i<=a;i++) scanf("%d",&x[i]);
	for(int i=1;i<=a;i++) scanf("%d",&y[i]);
	for(int i=1;i<=a;i++) x[i] += i;
	for(int i=1;i<=a;i++) y[i] += i;

	for(int i=1;i<=a;i++) index.push_back(x[i]);
	std::sort(index.begin(),index.end());
	index.erase(std::unique(index.begin(),index.end()),index.end());
	for(int i=0;i<index.size();i++) hash[index[i]] = i+1;
	for(int i=a;i>=1;i--) V[hash[x[i]]].push_back(i);

	for(int i=1;i<=a;i++) T.setValue(i,1);

	long long int ans = 0;
	for(int i=1;i<=a;i++)
	{
		if(hash.find(y[i])==hash.end())
		{
			printf("-1");
			return 0;
		}
		if(V[hash[y[i]]].size()==0)
		{
			printf("-1");
			return 0;
		}

		int t = V[hash[y[i]]].back();
		V[hash[y[i]]].pop_back();

		ans += T.getSum(1,t-1);
		T.setValue(t,0);
	}
	printf("%lld",ans);
}

#include <iostream>
#include <vector>
#include <deque>
#include <iomanip>
using namespace std;
using ll = int64_t;
using ld = double;

int main() {
  ll n;
  cin >> n;
  vector<vector<ll>> E(n, vector<ll>{});
  for(ll i=0; i<n; i++) {
    string S;
    cin >> S;
    for(ll j=0; j<n; j++) {
      if(S[j]=='1') {
        E[i].push_back(j);
      }
    }
  }

  // R[i] is the set of vertices reachable from i
  vector<vector<ll>> R(n, vector<ll>{});
  for(ll i=0; i<n; i++) {
    vector<int> SEEN(n, false);
    deque<ll> Q;
    Q.push_back(i);
    while(!Q.empty()) {
      ll x = Q.front(); Q.pop_front();
      if(SEEN[x]) { continue; }
      SEEN[x] = true;
      R[i].push_back(x);
      for(ll y : E[x]) {
        Q.push_back(y);
      }
    }
  }

  // P[i] is the set of vertices that can reach i
  vector<vector<ll>> P(n, vector<ll>{});
  for(ll i=0; i<n; i++) {
    for(ll j : R[i]) {
      P[j].push_back(i);
    }
  }

  ld ans = 0.0;
  for(ll i=0; i<n; i++) {
    ans += 1.0/static_cast<ld>(P[i].size());
  }
  cout << setprecision(16) << ans << endl;
}


/**
*    author:  Taichicchi
*    created: 17.04.2021 11:31:39
**/

#include <bits/stdc++.h>

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

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

int main() {
    long double R, X, Y;
    cin >> R >> X >> Y;
    long double D;
    D = sqrtl(pow(X, 2) + pow(Y, 2));
    if (R == D) {
        cout << 1 << endl;
        return 0;
    }
    if (R > D) {
        cout << 2 << endl;
        return 0;
    }

    cout << ceill(D / R) << endl;

    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <utility>
#include <string>
#include <fstream>
#include <map>
#include <set>
#include <queue>
#include <memory.h>

using namespace std;

typedef vector<int> VI;
typedef pair<long long, long long> PI;
typedef vector<PI> VPI;

#define FOR(i,a,n) for (int i = (a); i < (n); ++i)
#define FORE(i,a,n) for (int i = (a); i <= (n); ++i)
#define FORD(i,a,b) for (int i = (a); i >= (b); --i)
#define REP(i,n) FOR(i,0,n)
#define REPE(i,n) FORE(i,0,n)
#define LL long long
#define FIR(n) REP(i,n)
#define FJR(n) REP(j,n)
#define ALL(v) v.begin(), v.end()

#define FI FIR(n)
#define FJ FJR(n)
#define FR(i,a) FOR(i,a,n)
#define REPN(i) REP(i,n)

#define GI(n) scanf("%d", &n)
#define GI2(n,m) scanf("%d %d", &n, &m)

typedef pair<double, double> PDD;

int main() {
#ifdef LOCALF
	freopen("input.txt", "rt", stdin);
#endif
	ios::sync_with_stdio(false); cin.tie(0);

	int n, M, K; cin >> n >> M >> K;
	vector<PDD> f(n + 1 + M);
	vector<int> reachable(n + 1 + M, 1);

	double s = 0, t = 0;
	vector<int> ok(n + 1 + M, 1);
	int q = 0;
	REP(k, K) {
		cin >> q;
		ok[q] = 0;
	}

	FORD(i, n - 1, 0) {
		int last = i + M;
		reachable[i] = false;
		if (ok[i]) FJR(M) if (reachable[i + 1 + j]) {
			reachable[i] = true;
			break;
		}

		bool isb = false;

		if (!ok[i]) {
			f[i] = { 0, 1 };
		}
		else {
			f[i] = { 1 + s / M, t / M };
		}

		s -= f[last].first;
		t -= f[last].second;
		s += f[i].first;
		t += f[i].second;
	}

	if (!reachable[0]) {
		cout << "-1" << endl;
		return 0;
	}

	double res = f[0].first / (1 - f[0].second);
	cout.precision(10);
	cout << res << endl;

}


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

int main() {
	int n;
	string s;
	cin >> n >> s;
	int ans = -1;
	if (s[0] != s[n - 1]) ans = 1;
	else {
		for (int i = 1; i < n - 1; i++) {
			if (s[0] != s[i] && s[i + 1] != s[n - 1]) ans = 2;
			break;
		}
	}
	cout << ans << endl;
}

#include<bits/stdc++.h>
using namespace std;
//#include <atcoder/modint>
//using namespace atcoder;
//using mint = modint998244353;
//using mint = modint1000000007;
#pragma region template
using ll = long long;
using PII = pair<int, int>;
using PLL = pair<ll, ll>;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
#define overload4(_1,_2,_3,_4,name,...) name
#define overload3(_1,_2,_3,name,...) name
#define rep1(n) for(ll i=0;i<n;++i)
#define rep2(i,n) for(ll i=0;i<n;++i)
#define rep3(i,a,b) for(ll i=a;i<b;++i)
#define rep4(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(n) for(ll i=n;i--;)
#define rrep2(i,n) for(ll i=n;i--;)
#define rrep3(i,a,b) for(ll i=b;i-->(a);)
#define rrep(...) overload3(__VA_ARGS__,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define debug(var)  do{std::cerr << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cerr << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cerr << e << " "; } std::cerr << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cerr << endl;int cnt = 0;for(const auto& v : vv){cerr << cnt << "th : "; view(v); cnt++;} cerr << endl;}
std::ostream &operator<<(std::ostream &dest, __int128_t value) {
  std::ostream::sentry s(dest);
  if (s) {
    __uint128_t tmp = value < 0 ? -value : value;
    char buffer[128];
    char *d = std::end(buffer);
    do {
      --d;
      *d = "0123456789"[tmp % 10];
      tmp /= 10;
    } while (tmp != 0);
    if (value < 0) {
      --d;
      *d = '-';
    }
    int len = std::end(buffer) - d;
    if (dest.rdbuf()->sputn(d, len) != len) {
      dest.setstate(std::ios_base::badbit);
    }
  }
  return dest;
}
template<class T, class K>bool chmax(T &a, const K b) { if (a<b) { a=b; return 1; } return 0; }
template<class T, class K>bool chmin(T &a, const K b) { if (b<a) { a=b; return 1; } return 0; }
const int inf = 1001001001;
const ll INF = 1001001001001001001ll;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
ll rddiv(ll a, ll b) { return a/b-((a^b)<0&&a%b); } // -20 / 3 == -7
ll power(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a;} a = a * a; p >>= 1;} return ret;}
ll modpow(ll a, ll p, ll mod){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}
ll rudiv(ll a, ll b) { return a/b+((a^b)>0&&a%b); } //  20 / 3 == 7
#pragma endregion
//const double pi = acos(-1);
//const ll mod = 998244353;
const ll mod = 1000000007;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    //cout << fixed << setprecision(20);
    int n; cin >> n;
    string s; cin >> s;
    if(s[0] == s.back()){
        char c = s[0];
        rep(i,n - 1){
            if(s[i] != c && s[i + 1] != c) cout << 2 << endl, exit(0);
        }
        cout << -1 << endl;
    }
    else cout << 1 << endl;
}


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

// clang-format off
/* accelration */
// 高速バイナリ生成
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// cin cout の結びつけ解除, stdioと同期しない(入出力非同期化)
// cとstdの入出力を混在させるとバグるので注意
struct Fast {Fast() {std::cin.tie(0); ios::sync_with_stdio(false);}} fast;

/* alias */
using ull = unsigned long long;
using ll = long long;
using vi = vector<int>;
using vl = vector<long>;
using vll = vector<long long>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using vvll = vector<vll>;
using vs = vector<string>;
using pii = pair<int, int>;

/* define short */
#define pb push_back
#define mp make_pair
#define all(obj) (obj).begin(), (obj).end()
#define YESNO(bool) if(bool){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yesno(bool) if(bool){cout<<"yes"<<endl;}else{cout<<"no"<<endl;}
#define YesNo(bool) if(bool){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}

/* REP macro */
#define reps(i, a, n) for (ll i = (a); i < (ll)(n); ++i)
#define rep(i, n) reps(i, 0, n)
#define rrep(i, n) reps(i, 1, n + 1)
#define repd(i,n) for(ll i=n-1;i>=0;i--)
#define rrepd(i,n) for(ll i=n;i>=1;i--)

/* debug */
// 標準エラー出力を含む提出はrejectされる場合もあるので注意
#define debug(x) cerr << "\033[33m(line:" << __LINE__ << ") " << #x << ": " << x << "\033[m" << endl;

/* func */
inline int in_int() {int x; cin >> x; return x;}
inline ll in_ll() {ll x; cin >> x; return x;}
inline string in_str() {string x; cin >> x; return x;}
// search_length: 走査するベクトル長の上限(先頭から何要素目までを検索対象とするか、1始まりで)
template <typename T> inline bool vector_finder(std::vector<T> vec, T element, unsigned int search_length) {
    auto itr = std::find(vec.begin(), vec.end(), element);
    size_t index = std::distance( vec.begin(), itr );
    if (index == vec.size() || index >= search_length) {return false;} else {return true;}
}
template <typename T> inline void print(const vector<T>& v, string s = " ")
    {rep(i, v.size()) cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");}
template <typename T, typename S> inline void print(const pair<T, S>& p)
    {cout << p.first << " " << p.second << endl;}
template <typename T> inline void print(const T& x) {cout << x << "\n";}
template <typename T, typename S> inline void print(const vector<pair<T, S>>& v)
    {for (auto&& p : v) print(p);}
// 第一引数と第二引数を比較し、第一引数(a)をより大きい/小さい値に上書き
template <typename T> inline bool chmin(T& a, const T& b) {bool compare = a > b; if (a > b) a = b; return compare;}
template <typename T> inline bool chmax(T& a, const T& b) {bool compare = a < b; if (a < b) a = b; return compare;}
// gcd lcm
// C++17からは標準実装
// template <typename T> T gcd(T a, T b) {if (b == 0)return a; else return gcd(b, a % b);}
// template <typename T> inline T lcm(T a, T b) {return (a * b) / gcd(a, b);}
// clang-format on

struct P {
    double x, y;
};

int main() {

    int N;
    P p0, pp;

    cin >> N >> p0.x >> p0.y >> pp.x >> pp.y;

    P c_;
    c_.x = 0.5 * (p0.x + pp.x);
    c_.y = 0.5 * (p0.y + pp.y);

    P cx;
    cx.x = (-c_.x + p0.x);
    cx.y = (-c_.y + p0.y);

    double pi = -3.1415926535;
    double c = cos(pi / N);
    double s = sin(pi / N);

    P e;
    e.x = c_.x + c * (c * cx.x + s * cx.y);
    e.y = c_.y + c * (-s * cx.x + c * cx.y);

    cout << 2 * e.x - p0.x << "\t" << 2 * e.y - p0.y;

    return 0;
}

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

using namespace std;

int main(void)
{
    int n=0;
    int a[200000] = {};
    // int counter[200000] = {};
    long long count=0,temp_count=1;
    int i=0,j=0;

    cin >> n;

    for (i=0;i<n;i++){
        cin  >> a[i];
    }

    for(i=0;i<n;i++){
        a[i] %= 200;
    }
    sort(a,a+n,greater<int>());

    for(i=0;i<n-1;i++){
        for (j=i+1;j<n;j++){
            if(a[i]!= a[j] ) {
                count += (temp_count*(temp_count-1))/2;
                temp_count=1;
                i=j-1;
                break;
            }
            else temp_count++;
            if(j == n-1) {
                count += (temp_count*(temp_count-1))/2;
                temp_count=1;
                i=j-1;
                break;
            }
        }

    }

    // cout << count << endl;
    printf("%ld",count);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;

int main(){
  ull n,c=0;
  cin >> n;
  for(ull i=1;i<1000000;i++){
    string s = to_string(i) + to_string(i);
    if(stoull(s)<=n){
      c++;
    }
    else{
      break;
    }
  }
  cout << c << endl;
  return 0;
}

/*
 * @Author: Luisvacson
 * @LastEditors: Luisvacson
 * @Descriptions: None
 * @Date: 2021-03-20 20:06:05
 * @LastEditTime: 2021-03-20 20:40:54
 * @FilePath: \C++\Practice\ABC196C.cpp
 */
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[15], b[15];
string s;

signed main() {
    cin >> s;
    int n = s.size(), m, t = 1, ans = 0;
    if (n & 1)
        m = n >> 1;
    else
        m = (n >> 1) - 1;

    for (int i = 1; i <= m; i++) {
        ans += t * 9;
        t *= 10;
    }

    if (!(n & 1)) {
        ans = 0;
        int x = n / 2, cnt = 1;
        for (int i = 0; i < x; i++) a[i] = (s[i] - '0');
        for (int i = x; i < n; i++) b[i - x] = (s[i] - '0');
        bool flag = false;
        for (int i = 0; i < x; i++) {
            if (a[i] > b[i]) {
                flag = true;
                break;
            } else if (a[i] < b[i])
                break;
        }
        for (int i = 1; i < x; i++) {
            cnt *= 10;
        }
        for (int i = 0; i < x; i++) {
            ans += a[i] * cnt;
            cnt /= 10;
        }
        if (flag) ans--;
    }
    cout << ans << endl;
    return 0;
}


#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<iomanip>
using namespace std;
int main(){
  long double N,D,H,mini = 100000000,ans;
  vector<long double> d,h;
  cin >> N >> D >> H;
  d.resize(N);
  h.resize(N);
  for(long long i = 0;i<N;i++){
    cin >> d[i] >> h[i];
    mini = min(mini,(H-h[i])/(D-d[i]));
  }
  ans=H-mini*D;
  if(ans < 0){
    ans = 0;
  }
  cout << fixed << setprecision(15) << ans << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define for_(i, a, b) for(int i = (a);i < (b);++i)
#define ford_(i, a, b) for(int i = (b)-1;i >= (a);--i)
#define rep(i, n) for_(i, 0, n)
#define repd(i, n) rfor_(i, 0, n)

int main(){
  int n;
  double d,h;

  cin >> n >> d >> h;

  vector<double> a(n);
  vector<double> b(n);
  vector<double> m(n);

  rep(i,n){
    cin >> a.at(i) >> b.at(i);
    m.at(i) = (h - b.at(i)) / (d - a.at(i));
  }

  double ma = *min_element(m.begin(),m.end());

  double sepp = h - (d * ma);

  if(sepp < 0)cout << "0.0" << endl;
  else cout << sepp << endl;

  return 0;
}


//بسم الله الرحمن الرحيم

// ----->  Author :    N A Y E M
// ----->           [ CSE-19 , CU ]

#include<bits/stdc++.h>
using namespace std ;
typedef long long ll;
typedef unsigned long long ull ;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef double dl;
//using u128 = __uint128_t;
#define el << '\n'
#define sz(v) ((int)(v).size())
#define PI 3.141592653589793238
#define _test_ int _ ; cin >> _ ; while( _-- )
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define file() freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout)
ll gcd ( ll  a, ll b ) { return __gcd ( a, b ) ; }
ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ) ; }
ll big_mod(ll base , ll power , ll mod){
    ll ret=1;base%=mod;while(power){if(power&1)ret=ret*base%mod;base=base*base%mod;power>>=1;}return ret;}
ll mod_inverse(ll a , ll mod ){ return big_mod(a,mod-2,mod);}
ull POW(ll a , ll b){if(b==0) return 1;ull ret=1;while(b--)ret*=a;return ret;}
int dx[]={0,0,+1,-1,+1,-1,-1,+1} ;
int dy[]={+1,-1,0,0,+1,-1,+1,-1} ;
// ------------------>
const ll infLL = 1e15;
const int inf = 1e9;
const ll mod = 1e9+7;
const ll mX = 3e5+123;
// ------------------>
ll N,C,sum,total;

void _case_()
{
    cin >> N >> C ;
    vll v;
    for(int i=0;i<N;i++)
    {
        ll a,b,c;
        cin >> a >> b >> c;
        sum+=(b-a+1)*c;
        v.push_back({a,c});
        v.push_back({b+1,-c});
    }
    sort(v.begin(),v.end());
    for(int i=0;i<2*N;i++)
    {
        total += v[i].second ;
        if(total>C)
            sum -= (total-C)*(v[i+1].first-v[i].first);
    }
    cout << sum el;
}

int main( )
{
    optimize() ;
    //_test_
        _case_() ;
    return 0 ;
}

#pragma region header
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n)for(int i=0;i<(n);i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define int ll
#define each(i, a) for (auto &&i : (a))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using vvs = vector<vs>;
using vd = vector<ld>;
using vvd = vector<vd>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using vp = vector<P>;
using int128 = __int128_t;//cin coutはできない
template <class T>
using greater_queue = priority_queue<T, vector<T>, greater<T>>;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a / gcd(a, b) * b;};
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

template <class T>
void CVEC(const T &v) {
	int c = v.size() - 1;
	for (int i = 0; i < c; i++) cout << v[i] << ' ';
	if (c > -1) cout << v[c];
	cout << '\n';
}

#pragma endregion header

signed main(){
    int N, C; cin >> N >> C;
	vector<pair<int, int>> ma;
	rep(i,N) {
		int a, b, c; cin >> a >> b >> c;
		a--;
		ma.emplace_back(a, c);
		ma.emplace_back(b, -c);
	}
	sort(ALL(ma));
	int ans = 0;
	int now = 0;
	int today = 0;
	for(auto [x, y] : ma){
		if(x != today){
			ans += min(C, now) * (x - today);
			today = x;
		}
		now += y;
	}
	cout << ans << endl;
}


#define DEBUG 0
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define eb emplace_back
#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i, begin, end) for(int i = int(begin); i < int(end); i++)
#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end())
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T>using numr=std::numeric_limits<T>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const int INF = 1e9;
const ll LLINF = 1e16;
const int mod = 1000000007;
const int mod2 = 998244353;
void debug_impl() { std::cerr << std::endl; }
template <typename Head, typename... Tail>
void debug_impl(Head head, Tail... tail) { std::cerr << " " << head; debug_impl(tail...); }
#if DEBUG
#define debug(...)\
    do {\
        std::cerr << std::boolalpha << "[" << #__VA_ARGS__ << "]:";\
        debug_impl(__VA_ARGS__);\
        std::cerr << std::noboolalpha;\
    } while (false)
#else
#define debug(...) {}
#endif

template < typename Container, typename Value = typename Container::value_type, std::enable_if_t<!std::is_same< Container, std::string >::value, std::nullptr_t> = nullptr>
std::istream& operator>> (std::istream& is, Container& v)
    { for (auto & x : v) { is >> x; } return is; }

template < typename Container, typename Value = typename Container::value_type, std::enable_if_t<!std::is_same< Container, std::string >::value, std::nullptr_t> = nullptr >
std::ostream& operator<< (std::ostream& os, Container const& v) {
os << "{";
    for (auto it = v.begin(); it != v.end(); it++)
        {os << (it != v.begin() ? "," : "") << *it;}
    return os << "}";
}

// make_v -> auto a = make_v<int>(n,m)
template< typename T = int64_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 F >
struct FixPoint : F {
    FixPoint(F &&f) : F(forward< F >(f)) {}

    template< typename... Args >
    decltype(auto) operator()(Args &&... args) const {
        return F::operator()(*this, forward< Args >(args)...);
    }
};
template< typename F >
inline decltype(auto) MFP(F &&f) {
    return FixPoint< F >{forward< F >(f)};
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    ll ans = 0;
    ll a = 11,b=101,c=1001,d=10001,e=100001,f=1000001;
    for(ll i = 1;i<=9;i++){
        ll res = a*i;
        if(n>=res) ans++;
    }
    for(ll i = 10;i<=99;i++){
        ll res = b*i;
        if(n>=res) ans++;
    }
    for(ll i = 100;i<=999;i++){
        ll res = c*i;
        if(n>=res) ans++;
    }
    for(ll i = 1000;i<=9999;i++){
        ll res = d*i;
        if(n>=res) ans++;
    }
    for(ll i = 10000;i<=99999;i++){
        ll res = e*i;
        if(n>=res) ans++;
    }
    for(ll i = 100000;i<=999999;i++){
        ll res = f*i;
        if(n>=res) ans++;
    }
    cout << ans << endl;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T,class U> using P = pair<T,U>;
template<class T> using vec = vector<T>;
template<class T> using vvec = vector<vec<T>>;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

int main(){
    ll n; cin >> n;
    for(int i = 1; i <= 1e6; i++){
        int dig = 0;
        ll num = i;
        while(!num==0) {
            num /= 10;
            dig++;
        }
        ll tmp = i + i * pow(10, dig);
        // cout << tmp << endl;
        if (n < tmp) {
            cout << i - 1 << endl;
            return 0;
        }

    }
}


#include<ctime>
#include<queue>
#include<cstdio>
#include<cctype>
#include<cstring>
#define ll long long
const ll N=2e5+10;
using namespace std;
ll read() {
	char c;
	ll x=0,f=1;
	while(!isdigit(c=getchar()))
		f-=2*(c=='-');
	while (isdigit(c)){
		x=x*10+(c-48)*f;
		c=getchar();
	}
	return x;
}
struct edge{
	ll to,t,k,nxt;
	edge(ll a=0,ll b=0,ll c=0,ll d=0){
		to=a;
		t=b;
		k=c;
		nxt=d;
	}
};
edge e[N];
ll n,m,x,y,u,v,t,k;
ll tot,head[N],dis[N],vis[N];
void add(ll u,ll v,ll t,ll k){
	e[++tot]=edge(v,t,k,head[u]);
	head[u]=tot;
}
ll SPFA(){
	queue<ll>q;
	memset(dis,63,sizeof(dis));
	dis[x]=0;
	vis[x]=1;
	q.push(x);
	while(!q.empty()){
		ll u=q.front();
		q.pop();
		vis[u]=0;
		for(ll i=head[u];i;i=e[i].nxt){
			ll v=e[i].to;
			ll t=e[i].t;
			ll k=e[i].k;
			ll d=(dis[u]+k-1)/k*k;
			if(dis[v]>d+t){
				dis[v]=d+t;
				if(!vis[v]){
					vis[v]=1;
					q.push(v);
				}
			}
		}
	}
	if(dis[y]==dis[0])
		return -1;
	return dis[y];
}
int main() {
	#ifndef ONLINE_JUDGE
	freopen("E.in","r",stdin);
	freopen("E.out","w",stdout);
	#endif
	clock_t t1=clock();
	//--------
	n=read();
	m=read();
	x=read();
	y=read();
	for(ll i=1;i<=m;++i){
		u=read();
		v=read();
		t=read();
		k=read();
		add(u,v,t,k);
		add(v,u,t,k);
	}
	printf("%lld",SPFA());
	//--------
	clock_t t2=clock();
	fprintf(stderr,"time:%0.3lfs",1.0*(t2-t1)/CLOCKS_PER_SEC);
	return 0;
}

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

void DFS(int u, vector<set<int>>& edges, vector<set<int>>& to) {
    while (!edges[u].empty()) {
        int v = *(edges[u].begin());
        // u -> v
        edges[u].erase(v);
        edges[v].erase(u);
        to[u].insert(v);
        DFS(v, edges, to);
    }
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N, M;
    cin >> N >> M;
    vector<int> a(M), b(M);
    for (int i = 0; i < M; ++i) {
        cin >> a[i] >> b[i];
        --a[i];
        --b[i];
    }
    vector<int> c(N);
    for (int i = 0; i < N; ++i) {
        cin >> c[i];
    }
    vector<int> ans(M, 0); // 0 : <-, 1 : ->
    vector<set<int>> edges(N);
    for (int i = 0; i < M; ++i) {
        if (c[a[i]] < c[b[i]]) {
            ans[i] = 0;
        } else if (c[a[i]] > c[b[i]]) {
            ans[i] = 1;
        } else {
            edges[a[i]].insert(b[i]);
            edges[b[i]].insert(a[i]);
        }
    }
    vector<set<int>> to(N);
    for (int i = 0; i < N; ++i) {
        DFS(i, edges, to);
    }
    for (int i = 0; i < M; ++i) {
        if (to[a[i]].count(b[i])) {
            ans[i] = 1;
        }
    }
    for (int i = 0; i < M; ++i) {
        if (ans[i] == 0) {
            cout << "<-\n";
        } else {
            cout << "->\n";
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using std::cout;
using std::cin;
using std::endl;
using ll=long long;
using ld=long double;
ll I=1167167167167167167;
ll Q=1e9+7;
#define rep(i,a) for (ll i=0;i<a;i++)
template<class T> using _pq = priority_queue<T, vector<T>, greater<T>>;
template<class T> ll LB(vector<T> &v,T a){return lower_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> ll UB(vector<T> &v,T a){return upper_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}else return 0;}
template<class T> bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}else return 0;}
template<class T> void So(vector<T> &v) {sort(v.begin(),v.end());}
template<class T> void Sore(vector<T> &v) {sort(v.begin(),v.end(),[](T x,T y){return x>y;});}
template<class T> void print_tate(vector<T> &v) {rep(i,v.size()) cout<<v[i]<<"\n";}
void yneos(bool a){if(a) cout<<"Yes"<<"\n"; else cout<<"No"<<"\n";}

//おちこんだりもしたけれど、私はげんきです。
int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int N;
	cin>>N;
	ll cen[4];
	rep(i,4) cen[i]=0;
	vector<ll> A(N),B(N),C(N),D(N);
	rep(i,N){
		cin>>A[i]>>B[i];
		A[i]*=N;
		B[i]*=N;
		cen[0]+=A[i];
		cen[1]+=B[i];
	}
	rep(i,N){
		cin>>C[i]>>D[i];
		C[i]*=N;
		D[i]*=N;
		cen[2]+=C[i];
		cen[3]+=D[i];
	}
	rep(i,4) cen[i]/=N;
	rep(i,N){
		A[i]-=cen[0];
		B[i]-=cen[1];
		C[i]-=cen[2];
		D[i]-=cen[3];
	}
	if(A[0]*A[0]+B[0]*B[0]==0){
		swap(A[0],A[1]);
		swap(B[0],B[1]);
	}
	set<pair<int,int>> s;
	ll L=A[0]*A[0]+B[0]*B[0];
	rep(i,N) s.insert({C[i]*L,D[i]*L});
	bool T=false;
	vector<vector<ll>> q=
	{
		{A[0],B[0]},
		{B[0]*-1,A[0]}
	};
	//rep(i,N) cout<<A[i]<<" "<<B[i]<<" "<<C[i]<<" "<<D[i]<<endl;
	rep(i,N){
		if(L!=C[i]*C[i]+D[i]*D[i]) continue;
		bool U=true;
		vector<vector<ll>> p(2,vector<ll>(2));
		vector<vector<ll>> r=
		{
			{C[i],D[i]*-1},
			{D[i],C[i]}
		};
		rep(a,2) rep(b,2) rep(c,2){
			p[a][b]+=q[a][c]*r[c][b];
		}
		/*rep(i,2){
			rep(j,2) cout<<p[i][j]<<" ";
			cout<<endl;
		}*/
		rep(j,N){
			ll X=0,Y=0;
			X=A[j]*p[0][0]+B[j]*p[0][1];
			Y=A[j]*p[1][0]+B[j]*p[1][1];
			if( !s.count({X,Y}) ){
				U=false;
				break;
			}
		}
		T|=U;
	}
	yneos(T);
}

#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define COUT(x) cout<<(x)<<"\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define REP(i,n) for(int i=0;i<n;i++)
#define YES(x) cout<<(x?"YES":"NO")<<"\n"
#define Yes(x) cout<<(x?"Yes":"No")<<"\n"
#define dump(x) cout<<#x<<" = "<<(x)<<"\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int,int>;
using P = pair<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int,vector<int>,greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct { int to; int cost; };
template<class T>bool chmax(T &a,const T &b) {if(a<b){a=b; return 1;} return 0;}
template<class T>bool chmin(T &a,const T &b) {if(b<a){a=b; return 1;} return 0;}
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int main() {
  IOS;
  int h,w; cin >> h >> w;
  int a[h][w];
  int mina = INF;
  REP(i,h) REP(j,w){
    cin >> a[i][j];
    chmin(mina,a[i][j]);
  }

  int ans = 0;
  REP(i,h) REP(j,w){
    ans += a[i][j] - mina;
  }
  COUT(ans);

  return 0;
}


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

int main() {
	int c; cin >> c;
  cout << (c-1) / 100 + 1 << endl;
}

/*
ID: anonymo14
TASK: wormhole
LANG: C++
*/
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

int solve() {//267
	int num;
	cin>>num;
	int rem = num%100;
	num/=100;
	if(rem)num++;
	return num;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t=1;
	// cin>>t;
	// prefill();
	while(t--) {
		// cout<<(solve()?"Yes":"No")<<endl;
		// printf("%.6lf\n",solve());
		cout<<solve()<<endl;
		// solve();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=5e5+5;
char s[maxn],t[2][maxn],st[maxn],k[maxn];
int n,C,tot,p[maxn],sum[maxn],top,K,cnt[2];

int main(){
	scanf("%s",s+1);
	n=strlen(s+1);
	for(int i=1;i<=n;i++){
		if(s[i]=='R')tot^=1,++C;
		else{
			t[tot][++cnt[tot]]=s[i];
		}
	}
	if(C%2==0){
		for(int i=cnt[1];i;i--)k[++K]=t[1][i];
		for(int i=1;i<=cnt[0];i++)k[++K]=t[0][i];
	}
	else{
		for(int i=cnt[0];i;i--)k[++K]=t[0][i];
		for(int i=1;i<=cnt[1];i++)k[++K]=t[1][i];
	}
	for(int i=1;i<=K;i++){
		st[++top]=k[i];
		while(top>=2&&st[top]==st[top-1])top-=2;
	}
	for(int i=1;i<=top;i++)putchar(st[i]);
	return 0;
}

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
#include <stdlib.h>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <climits>
#include <iomanip>
#include <deque>
#include <limits>
#include <map>
#include <set>
#include <functional>

using namespace std;

int main()
{
  uint64_t X, Y, A, B;

  cin >> X >> Y >> A >> B;

  uint64_t exp = 0;

  while (true) {
    if (X > (B / (A - 1))) break;

    X *= A;

    if (X >= Y) {
      cout << exp << endl;
      return 0;
    }

    exp++;
  }

  if ((Y - X) % B == 0) {
    cout << exp + (Y - X) / B - 1 << endl;
  }
  else {
    cout << exp + (Y - X) / B << endl;
  }

  return 0;
}


#include <bits/stdc++.h>

typedef long long ll;

const int N = 100;
const int S = N * N;
const int P = 998244353;

inline int norm(int x) {if (x >= P) x -= P; return x;}
inline int reduce(int x) {if (x < 0) x += P; return x;}
inline void add(int &x, int y) {if ((x += y) >= P) x -= P;}
inline void sub(int &x, int y) {if ((x -= y) < 0) x += P;}
int mpow(int b, int p) {
	int r = 1;
	for (; p; p >>= 1, b = (ll)b * b % P)
		if (p & 1) r = (ll)r * b % P;
	return r;
}

int fct[N + 5];
int f[N + 5][N + 5][2*S + 5], w[N + 5], n;

int main() {
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
		scanf("%d", &w[i]);

	fct[0] = 1; for (int i = 1; i <= n; i++) fct[i] = (ll)fct[i - 1] * i % P;

	f[0][0][S] = 1;
	for (int i = 0; i < n; i++) for (int j = 0; i + j < n; j++) {
		int p = w[i + j + 1];
		for (int k = p; k <= (S << 1); k++) add(f[i + 1][j][k], f[i][j][k - p]);
		for (int k = (S << 1) - p; k >= 0; k--) add(f[i][j + 1][k], f[i][j][k + p]);
	}

	int ans = 0;
	for (int i = 0; i <= n; i++) ans = (ans + (ll)fct[i] * fct[n - i] % P * f[i][n - i][S]) % P;
	printf("%d\n", ans);
}

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <cmath>
#include <numeric>
#include <functional>
#include <cassert>

#define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl;
#define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using namespace std;
typedef long long ll;

const ll MOD = 998244353;

class ModInt{
    public:
    ll v;
    ModInt(ll _v = 0){
        if(_v < 0) _v = (v%MOD)+MOD;
        if(_v >= MOD) _v %= MOD;
        v = _v;
    }
    ModInt operator+(ll n){
        return ModInt((v+n)%MOD);
    }
    ModInt operator-(ll n){
        return ModInt((v-n+MOD)%MOD);
    }
    ModInt operator*(ll n){
        if(n >= MOD) n %= MOD;
        return ModInt((v*n)%MOD);
    }
    ModInt operator/(ll n){
        return ModInt((ModInt(n).inv()*v).v%MOD);
    }

    void operator+=(ll n){
        v = (v+n)%MOD;
    }
    void operator-=(ll n){
        v = (v-n+MOD)%MOD;
    }
    void operator*=(ll n){
        v = (v*n+MOD)%MOD;
    }

    ModInt operator+(ModInt n){
        return ModInt((v+n.v)%MOD);
    }
    ModInt operator-(ModInt n){
        return ModInt((v-n.v+MOD)%MOD);
    }
    ModInt operator*(ModInt n){
        return ModInt((v*n.v)%MOD);
    }
    ModInt operator/(ModInt n){
        return ModInt((n.inv()*v).v%MOD);
    }

    void operator+=(ModInt n){
        v = (v+n.v)%MOD;
    }
    void operator-=(ModInt n){
        v = (v-n.v+MOD)%MOD;
    }
    void operator*=(ModInt n){
        v = (v*n.v)%MOD;
    }

    void operator=(ModInt n){
        v = n.v;
    }
    bool operator==(ModInt n){
        return v == n.v;
    }
    bool operator!=(ModInt n){
        return v != n.v;
    }
    void operator=(ll n){
        v = n%MOD;
    }

    ModInt inv(){
        if(v == 1) return ModInt(1);
        else return ModInt(MOD-ModInt(MOD%v).inv().v*(MOD/v)%MOD);
    }
};

ostream& operator<<(ostream& os, const ModInt& m){
    os << m.v;
    return os;
}

istream & operator >> (istream &in,  ModInt &m){
    in >> m.v;
    return in;
}

ModInt pow(ModInt a, ll n) {
    assert(n >= 0);
	ModInt ans = 1;
	ModInt tmp = a;
	for (int i = 0; i <= 60; i++) {
		ll m = (ll)1 << i;
		if (m & n) {
		ans *= tmp;
		}
		tmp *= tmp;
	}
	return ans;
}

#define N_MAX 200002
ModInt inv[N_MAX],fac[N_MAX],finv[N_MAX];

void init(){
    fac[0]=1;fac[1]=1;
    finv[0]=1;finv[1]=1;
    inv[1]=1;
    for(int i=2;i<N_MAX;i++){
        inv[i]=ModInt(MOD)-inv[MOD%i]*(MOD/i);
        fac[i]=fac[i-1]*(ll) i;
        finv[i]=finv[i-1]*inv[i];
    }
}

using mint = ModInt;

mint dp[105][105][10005];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    init();
    int n; cin >> n;
    vector<int> w(n);
    for(int i = 0; i < n; i++) cin >> w[i];
    int sum = accumulate(w.begin(), w.end(), 0);
    dp[0][0][0] = 1;
    for(int i = 0; i < n; i++){
        for(int j = 0; j <= i; j++){
            for(int k = 0; k <= sum; k++){
                if(dp[i][j][k].v == 0) continue;
                dp[i+1][j][k] += dp[i][j][k];
                dp[i+1][j+1][k+w[i]] += dp[i][j][k];
            }
        }
    }
    if(sum%2 != 0){
        cout << 0 << endl;
        return 0;
    }
    mint ans = 0;
    for(int i = 0; i <= n; i++){
        ans += dp[n][i][sum/2]*fac[i]*fac[n-i];
    }
    cout << ans << endl;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long R,x,y;
	cin>>R>>x>>y;
	float D = sqrt(x*x+y*y);
	if(D==R)
	{
		cout<<1<<endl;
	}
	else if(D<=R+R)
	{
		cout<<2<<endl;
	}
	else cout<<ceil(D/R)<<endl;
	return 0;
}

#include <bits/stdc++.h>
typedef long long ll;
#define ALL(l)  (l).begin(),(l).end()
#define rep(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
using namespace std;

//const ll mod =  998244353;
//const ll maxn = 1000000000;
//const ll mod = 1000000007;

//---------------------------------------------------------------------------------------------------
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vll = vector<ll>; // intの1次元の型に vi という別名をつける
using vvll = vector<vll>; // intの2次元の型に vvi という別名をつける
using vs = vector<string>; // stringの1次元の型に vs という別名をつける
using pll = pair<ll, ll>; // これ以降 pii という型名はpair<ll, ll> と同じ意味で使える
//---------------------------------------------------------------------------------------------------
template <typename T>
void chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
  }
}
template <typename T>
void chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
  }
}

int main() {
   //cout << fixed << setprecision(10);
   ll r;
   cin>>r;
   double x,y;
   cin>>x>>y;

   double rxy=sqrt(x*x+y*y);
   //cout<<rxy<<endl;
  if(r==rxy)cout<<1<<endl;
  else if(r>rxy)cout<<2<<endl;
  else{
   ll dis=0;
   rep(i,100000000){

       if(dis>=rxy){
           cout<<i<<endl;
           return 0;
       }
       dis+=r;

   }
  }

}


/*
                    author         : TAPAN SAVANI
                    codeforces     : savanitapan2001
                    codechef       : savanitapan17
*/

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

░██╗░░░░░░░██╗░█████╗░██████╗░██╗░░██╗  ██╗░░██╗░█████╗░██████╗░██████╗░
░██║░░██╗░░██║██╔══██╗██╔══██╗██║░██╔╝  ██║░░██║██╔══██╗██╔══██╗██╔══██╗
░╚██╗████╗██╔╝██║░░██║██████╔╝█████═╝░  ███████║███████║██████╔╝██║░░██║
░░████╔═████║░██║░░██║██╔══██╗██╔═██╗░  ██╔══██║██╔══██║██╔══██╗██║░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝██║░░██║██║░╚██╗  ██║░░██║██║░░██║██║░░██║██████╔╝
░░░╚═╝░░░╚═╝░░░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝  ╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░

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

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

#define HAPPY_CODING              \
    ios_base::sync_with_stdio(0); \
    cin.tie(NULL);                \
    cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define Debug(x) cout << #x " = " << (x) << endl
#define SORT(a) sort(a.begin(), a.end())
#define SORTR(a) sort(a.rbegin(), a.rend())
#define mod 1000000007
#define pi 3.141592653589793238
#define ll long long int
#define ull unsigned long long
#define be begin()
#define en end()
#define FOR(i, a, b) for (long long int i = a; i < b; i++)
#define FORI(i, a, b) for (int i = a; i >= b; i--)

typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
typedef pair<ll, ll> PL;
typedef vector<PI> VPI;

int main()
{
    HAPPY_CODING;

    int A, B;
    cin >> A >> B;
    for (int c = B;; c--)
        if ((A + c - 1) / c < B / c)
        {
            cout << c << endl;
            return 0;
        }
}

#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <class c, class cmp = less<c> > using ordered_set = tree<c, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
template<class T> ostream& operator<<(ostream &os, vector<T> V) {os << "[ "; for(auto v : V) os << v << " "; return os << "]";}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {return os << "(" << P.first << "," << P.second << ")";}
template <typename T,typename U>pair<T,U> operator+(const pair<T,U> & l,const std::pair<T,U> & r) { return {l.first+r.first,l.second+r.second};}
typedef long long int ll;
const ll mod = 1e9 + 7;
const ll maxn = 5e6 + 5;
#define endl '\n'
#define ld long double
#define int ll
#define all(x)  (x).begin(),(x).end()
const ll md = (ll) 1e9 + 7;

inline ll add(ll a, ll b) {
  a += b;
  if (a >= md) a -= md;
  return a;
}

inline ll sub(ll a, ll b) {
  a -= b;
  if (a < 0) a += md;
  return a;
}

inline ll mul(ll a, ll b) {
  return (ll) ((long long)((a%md) * (b%md)) % md);
}

inline ll power(ll a, long long b) {
  ll res = 1;
  while (b > 0) {
    if (b & 1) {
      res = mul(res, a);
    }
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}

inline ll inv(ll a) {
  a %= md;
  if (a < 0) a += md;
  ll b = md, u = 0, v = 1;
  while (a) {
    ll t = b / a;
    b -= t * a; swap(a, b);
    u -= t * v; swap(u, v);
  }
  assert(b == 1);
  if (u < 0) u += md;
  return u;
}

vector<int> fact(maxn+5);
void init (int n)
{
  fact[0] = 1;
  for(int i = 1;i<=n;i++)
  {
    fact[i] = mul(i,fact[i-1]);
  }
}
int nck(int n,int k)
{
  return mul(fact[n],mul(inv(fact[k]),inv(fact[n-k])));
}

int32_t main(){

  IOS

  init(5000000);

  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  int k = 1;
  for(int i = 0;i<n;i++){
    cin >> a[i];
    m -= a[i];
    k += a[i] + 1;
  }

  if(m < 0){
    cout << 0 << endl;
    return 0;
  }

  int num = k - 1 + m;
  int den = k - 1;
  int ans = 1;
  for(int i = 0;i<den;i++){
    ans = mul(ans, num - i);
  }

  ans = mul(ans, inv(fact[den]));

  cout << ans << endl;

}


#include "bits/stdc++.h"
#define int long
#define MOD 1000000007
#define PI 3.14159265359
#define fi first
#define se second
#define pb push_back
#define se second
#define vi vector<int>
#define vvi vector<vi>
#define len(x) (int)x.size()
#define pi pair<int,int>
#define vpi vector<pi>
#define maxheap priority_queue<int>
#define minheap priority_queue<int,vi,greater<int>>
#define bits(x) __builtin_popcount(x)
#define fixed(x) cout<<fixed<<setprecision(x);
using namespace std;
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {return os << "(" << P.first << "," << P.second << ")";}
template<class T> ostream& operator<<(ostream &os, vector<T> V) {for(auto v : V) os << v << " ";return os<<"";}
template<class T> ostream& operator<<(ostream &os, set<T> S){os << "{ ";for(auto s:S) os<<s<<" ";return os<<"}";}
template<class T> ostream& operator<<(ostream &os, unordered_set<T> S){os << "{ ";for(auto s:S) os<<s<<" ";return os<<"}";}
template<class T> ostream& operator<<(ostream &os, multiset<T> S){os << "{ ";for(auto s:S) os<<s<<" ";return os<<"}";}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {os << "{ ";for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";return os<<"}";}
template<class L, class R> ostream& operator<<(ostream &os, unordered_map<L,R> M) {os << "{ ";for(auto m:M) os<<"("<<m.fi<<":"<<m.se<<") ";return os<<"}";}
template<typename T> istream& operator>>(istream& in,vector<T> &a){for(int i=0;i<len(a);i++)in>>a[i];return in;}
template<typename T1, typename T2> istream& operator>>(istream& in,pair<T1,T2>&p){in>>p.fi>>p.se;return in;}
template<typename T>
void print(T t){cout<<(t);cout<<'\n';}
template<typename T, typename... Args>
void print(T t, Args... args){cout << (t) <<' ';print(args...);}
inline int mul(int a,int b){return (1LL*a*b)%MOD;}
inline void add(int &x,int b){x += b;if(x>=MOD)x-=MOD;}
inline int bpow(int a,int b){int rt=1;while(b>0){if(b&1)rt=mul(rt,a);a=mul(a,a);b>>=1;}return rt;}
int gcd(int a,int b){if(a==0)return b;return gcd(b%a,a);}
const int N = 2e5+1;
int n,q,c[N],tp,a,b,par[N],sz[N];
map<int,map<int,int>>d;
int find(int x){
    if(par[x]==x)return x;
    return find(par[x]);
}
void unite(int x,int y){
    int p1=find(x),p2=find(y);
    if(p1==p2)return;
    if(sz[p1]>sz[p2]){
        sz[p1] += sz[p2];
        par[p2] = p1;
        // d[p1][c[y]]++;
        for(auto p:d[p2]){
            d[p1][p.fi]+=p.se;
        }
    }else{
        sz[p2] += sz[p1];
        par[p1] = p2;
        // d[p2][c[x]]++;
        for(auto p:d[p1]){
            d[p2][p.fi]+=p.se;
        }
    }
}
int32_t main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin>>n>>q;
    for (int i = 1; i <= n; ++i)
    {
        cin>>c[i];
        par[i] = i,sz[i] = 1;
        d[i][c[i]]++;
    }
    for(int i=0;i<q;i++){
        cin>>tp>>a>>b;
        if(tp==1){
            unite(a,b);
            // print(d);
        }else{
            print(d[find(a)][b]);
        }
    }
    return 0;
}

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

class disjoint_set {
    std::vector<int> parent;
public:
    std::vector<std::map<int,int>> mp;
    disjoint_set(int n): parent(n,-1), mp(n) {};
    int find(int x) {
        if (parent[x] < 0) return x;
        return parent[x] = find(parent[x]);
    }
    void fusion(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) return;
        if (parent[x] > parent[y]) std::swap(x, y);
        for (auto c: mp[y]) {
            mp[x][c.first] += c.second;
        }
        parent[x] += parent[y];
        parent[y] = x;
    }
};

int main() {
    int n, q;
    std::cin >> n >> q;
    disjoint_set d(n);
    for (int i {0}; i<n; ++i) {
        int c;
        std::cin >> c;
        d.mp[i][c] = 1;
    }
    for (int i {0}; i<q; ++i) {
        int type;
        std::cin >> type;
        if (type == 1) {
            int a, b;
            std::cin >> a >> b;
            --a;
            --b;
            d.fusion(a, b);
        } else {
            int x, y;
            std::cin >> x >> y;
            --x;
            x = d.find(x);
            std::cout << d.mp[x][y] << std::endl;
        }
    }
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#define endl '\n';
#define sz(s) int(s.size())
#define all(v) ((v).begin()),((v).end())
#define allr(v) ((v).rbegin()), ((v).rend())
#define mem(x,y) memset(x,y,sizeof(x))
#define Ceil(x,y)  ((x+y-1)/y)
typedef long long ll;
typedef double dl;
using namespace std;
void Selim()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
/***************************************************/
vector<vector<int>>adjList;
vector<int>color, dis, ok;
bool vis[int(1e5 + 10)];
set<int>st;
void DFS(int node){
	vis[node] = 1;
	if (!ok[color[node]]){
		st.insert(node);
	}
	ok[color[node]]++;
	for (auto child : adjList[node]){
		if (vis[child])continue;
		DFS(child);
	}
	ok[color[node]]--;
}
void solve(){
	int n;
	cin >> n;
	adjList.resize(1e5 + 5);
	color.resize(1e5 + 5);
	dis.resize(n + 1, 1e9);
	ok.resize(1e5 + 5, 0);
	dis[1] = 0;
	for (int i = 1; i <= n; i++){
		cin >> color[i];
	}
	for (int i = 1; i < n; i++){
		int u, v;
		cin >> u >> v;
		adjList[u].push_back(v);
		adjList[v].push_back(u);
	}
	DFS(1);
	st.insert(1);
	for (auto it : st){
		cout << it << endl;
	}
}
int main()
{
	Selim();
	int t = 1;
	//cin >> t;
	while (t--)
		solve();
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (ll i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld=long double;
using vin=vector<int>;
using vvin=vector<vin>;
using vll=vector<ll>;
using vvll=vector<vll>;
using vst=vector<string>;
using P = pair<ll,ll>;
using vp=vector<P>;
using vvp=vector<vp>;
const int inf=1e9+7;
const ll INF=9e18/2;
const long double PI = acosl(-1.0);
const long double EPS=1e-10;
template <typename T> bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;}
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[8] = {0,0,1,-1,1,1,-1,-1};
const int dy[8] = {1,-1,0,0,1,-1,1,-1};
template<typename T>void vecout(const vector<T> &a){int n=a.size();rep(i,0,n)cout<<a[i]<<(i==n-1 ? "":" ");cout<<endl;}

int f(vin &a,int x){
  int ret=0;
  auto it=upper_bound(all(a),x);
  ret=it-a.begin();
  return ret;
}

vvin cdp;//positive
vvin cdn;//negative
vin c;

vector<vector<int>> g;
vector<int> in,out;
int counter;

void euler_tour(int now,int par=-1){
 cdp[c[now]].pb(counter);
 in[now]=counter++;

 for(int to:g[now])if(to!=par)euler_tour(to,now);

 cdn[c[now]].pb(counter);
 out[now]=counter++;
}

int main(){//cout<<fixed<<setprecision(20);
  cdp.resize(110000);
  cdn.resize(110000);
  int n;
  cin>>n;
  c.resize(n);
  rep(i,0,n)cin>>c[i];
  g.resize(n);
  in.resize(n);
  out.resize(n);
  rep(i,0,n-1){
    int a,b;
    cin>>a>>b;
    a--;b--;
    g[a].pb(b);
    g[b].pb(a);
  }

  euler_tour(0);

  rep(i,0,n){
   int pc=f(cdp[c[i]],in[i]);
   int nc=f(cdn[c[i]],in[i]);
   if(pc-nc==1)cout<<i+1<<endl;
  }
}


#include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>
#include<sstream>
#include<complex>
#include<iomanip>
#include<numeric>
#include<cassert>
#include<random>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (int)(Y);++(X))
#define reps(X,S,Y) for (int (X) = (int)(S);(X) < (int)(Y);++(X))
#define rrep(X,Y) for (int (X) = (int)(Y)-1;(X) >=0;--(X))
#define rreps(X,S,Y) for (int (X) = (int)(Y)-1;(X) >= (int)(S);--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define Endl endl
#define NL <<"\n"
#define cauto const auto

using namespace std;
using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
template<class T> using vv=vector<vector<T>>;
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
//#undef NUIP
#ifdef NUIP
#include "benri.h"
#else
#define out(args...)
#endif
void ouT(ll x,int d=3){auto re=to_string(x);if((int)re.size()>d) re=x>0?"oo":"-oo";cout<<string(d-re.size(),' ')<<re<<",";}
#ifdef __cpp_init_captures
template<typename T>vector<T> table(int n, T v){ return vector<T>(n, v);}
template <class... Args> auto table(int n, Args... args){auto val = table(args...); return vector<decltype(val)>(n, move(val));}
#endif
template<class A,class B> pair<A,B> operator+(const pair<A,B> &p,const pair<A,B> &q){ return {p.X+q.X,p.Y+q.Y};}
template<class A,class B,class C,class D> pair<A,B>& operator+=(pair<A,B> &p,const pair<C,D> &q){ p.X+=q.X; p.Y+=q.Y; return p;}
template<class A,class B> pair<A,B> operator-(const pair<A,B> &p,const pair<A,B> &q){ return {p.X-q.X,p.Y-q.Y};}
template<class A,class B,class C,class D> pair<A,B>& operator-=(pair<A,B> &p,const pair<C,D> &q){ p.X-=q.X; p.Y-=q.Y; return p;}
template<class A,class B> istream& operator>>(istream &is, pair<A,B> &p){ is>>p.X>>p.Y; return is;}
template<class T=ll> T read(){ T re; cin>>re; return move(re);}
template<class T=ll> T read(const T &dec){ T re; cin>>re; return re-dec;}
template<class T=ll> vector<T> readV(const int sz){ vector<T> re(sz); for(auto &x:re) x=read<T>(); return move(re);}
template<class T=ll> vector<T> readV(const int sz, const T &dec){ vector<T> re(sz); for(auto &x:re) x=read<T>(dec); return move(re);}
vv<int> readG(const int &n,const int &m){ vv<int> g(n); rep(_,m){ cauto a=read<int>(1),b=read<int>(1); g[a].pb(b); g[b].pb(a);} return move(g);}
vv<int> readG(const int &n){ return readG(n,n-1);}
#define TT cauto TTT=read();rep(_,TTT)
const ll MOD=1e9+7; //998244353;

int main(){
  ios_base::sync_with_stdio(false); cin.tie(0);
  cout<<fixed<<setprecision(0);
	cauto a=read();
	cauto b=read();
	cauto c=read();
	cout<<(a*a+b*b<c*c?"Yes":"No") NL;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
// Compile with "(g++) -std=c++11 -Wall -Wextra -Wconversion -Wshadow -Dcychien"
#ifdef cychien
#define debug(...) do {\
	fprintf(stderr, "%s - %d : (%s) = ", __PRETTY_FUNCTION__, __LINE__, #__VA_ARGS__);\
    _DO(__VA_ARGS__);\
}while(0)
template<typename I> void _DO(I&&x) {cerr << x << '\n';}
template<typename I, typename ...T> void _DO(I&&x,T&&...tail) {cerr << x << ", "; _DO(tail...);}
#define IOS
#else
#define debug(...)
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#endif
#define FOR(i, n) for(int i = 0; i < n; i++)
#define FOR1(i, n) for(int i = 1; i <= n; i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define SZ(x) (ll)x.size()
#define ALL(x) (x).begin(),(x).end()
#define SORT(x) sort(ALL(x))
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
const int NF = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 1e9 + 7;
const ld PI = 3.14159265358979323846264338327950288;
#define int ll
ll ext_gcd(ll a, ll b, ll &x, ll &y) {
        if(b == 0) {
                x = 1; y = 0;
                return a;
        }
        int ret = ext_gcd(b, a%b, y, x);
        y -= x*(a / b);
        return ret;
}
class ChineseRemainderTheorem {
    typedef long long vlong;
    typedef pair<vlong,vlong> pll;

    /** CRT Equations stored as pairs of vector. See addEqation()*/
    vector<pll> equations;

public:
    void clear() {
        equations.clear();
    }

    /** Add equation of the form x = r (mod m)*/
    void addEquation( vlong r, vlong m ) {
        equations.push_back({r, m});
    }
    pll solve() {
        if (equations.size() == 0) return {-1,-1}; /// No equations to solve

        vlong a1 = equations[0].first;
        vlong m1 = equations[0].second;
        a1 %= m1;
        /** Initially x = a_0 (mod m_0)*/

        /** Merge the solution with remaining equations */
        for ( int i = 1; i < equations.size(); i++ ) {
            vlong a2 = equations[i].first;
            vlong m2 = equations[i].second;

            vlong g = __gcd(m1, m2);
            if ( a1 % g != a2 % g ) return {-1,-1}; /// Conflict in equations

            /** Merge the two equations*/
            ll p, q;
            ext_gcd(m1/g, m2/g, p, q);

            vlong mod = m1 / g * m2;
            vlong x = ( (__int128)a1 * (m2/g) % mod *q % mod + (__int128)a2 * (m1/g) % mod * p % mod ) % mod;

            /** Merged equation*/
            a1 = x;
            if ( a1 < 0 ) a1 += mod;
            m1 = mod;
        }
        return {a1, m1};
    }
};
main() {
    IOS;
    int t;
    cin >> t;
    ChineseRemainderTheorem crt;
    while (t--){
    	ll res = -1;
    	ll x, y, p, q;
    	cin >> x >> y >> p >> q;
    	for (ll i = 0; i < y; i++){
    		for (ll j = 0; j < q; j++){
    			crt.clear();
    			crt.addEquation(x + i, 2 * x + 2 * y);
    			crt.addEquation(p + j, p + q);
    			pll ans = crt.solve();
    			if (ans.X != -1){
    				if (res == -1)
    					res = ans.X;
    				else
    					res = min(res, ans.X);
				}
			}
		}
		if (res == -1){
			cout << "infinity\n";
		}
		else {
			cout << res << '\n';
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;

#pragma GCC optimize("O3")
#ifdef LOCAL
#include "/Users/lbjlc/Desktop/coding/debug_utils.h"
#else
#define print(...) ;
#define printn(...) ;
#define printg(...) ;
#define fprint(...) ;
#define fprintn(...) ;
#endif

#define rep(i, a, b) for(auto i = (a); i < (b); i++)
#define rrep(i, a, b) for(auto i = (a); i > (b); i--)
#define all(v) (v).begin(), (v).end()
#define pb push_back
// #define mp make_pair
#define fi first
#define se second
#define maxi(x, y) x = max(x, y)
#define mini(x, y) x = min(x, y)
// long long fact(long long n) { if(!n) return 1; return n*fact(n-1); }
// #define endl '\n'
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int get_random() {
    static uniform_int_distribution<int> dist(0, 1e9 + 6);
    return dist(rng);
}
#define solve_testcase int T;cin>>T;for(int t=1;t<=T;t++){solve(t);}

typedef unsigned long long ull;
typedef long long ll;

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

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<pdd> vpdd;
typedef vector<long long> vll;
#define bd(type,op,val) bind(op<type>(), std::placeholders::_1, val)

template<class T>
void make_unique(T & v) {
    sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());
}
int geti() { int x; cin >> x; return x; }
long long getll() { long long x; cin >> x; return x; }
double getd() { double x; cin >> x; return x; }
// pair<int, int> a(geti(), geti()) does not work
// pair<int, int> a({geti(), geti()}) works, since it uses initializer.

const int MAXN = 3e5 + 100;

void solve(int tt) {
    // cout<<"Case #"<<tt<<": ";
}

int main(int argc, char * argv[]) {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    // solve_testcase;

    int n;
    cin>>n;

    string s;
    cin>>s;
    const string s110="110";

    ll tot=1e10;
    if(n==1) {
    	if(s[0]=='0') cout<<tot<<endl;
    	else cout<<2*tot<<endl;
    	return 0;
    }

    if(s[0]=='0') s = "11"+s;
    else if(s[1]=='0') s = "1"+s;

    n=s.size();
    if(s[n-1]=='1') {
    	if(s[n-2]=='1') s+='0';
    	else s += "10";
    }

    print(s);

    if(s.size()%3) {
    	cout<<0<<endl;
    	return 0;
    }

    int ok=1;
    rep(i,0,n) {
    	if(s[i]!=(i%3==2?'0':'1'))
    		ok=0;
    }
    if(!ok) {
    	cout<<0<<endl;
    	return 0;
    }

    cout<<tot-ll(s.size())/3+1<<endl;

    return 0;
}

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

typedef long long ll;
#ifdef LOCAL
    constexpr int DEBUG = 1;
#else
    constexpr int DEBUG = 0;
#endif

const int N = 505;
const int MOD = 998244353;
char s[N][N], t[N + N];
void solve() {
    int n, m;
    scanf("%d%d", &n, &m);
    for(int i = 1; i <= n; ++i)
        scanf("%s", s[i] + 1);
    for(int i = 1; i <= n; ++i){
        for(int j = 1; j <= m; ++j){
            if(s[i][j] == 'B'){
                if(t[i + j] == 'R'){
                    cout << 0 << endl; return;
                }
                t[i + j] = 'B';
            }
            if(s[i][j] == 'R'){
                if(t[i + j] == 'B'){
                    cout << 0 << endl; return;
                }
                t[i + j] = 'R';
            }
        }
    }
    ll ans = 1;
    for(int i = 2; i <= n + m; ++i){
        if(t[i] == 0) ans = ans * 2 % MOD;
    }
    cout << ans << endl;
}
int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    cout << "start Debug" << endl;
#endif
    int _ = 1;
    // cin >> _;
    for(int i = 1; i <= _; ++i) solve();
}


#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef double lf;
#define Rl(x) scanf ("%lld", &x)
#define Ri(x) scanf ("%d", &x)
#define Rf(x) scanf ("%lf", &x)
const int maxn = 2e5 + 5, mod = 998244353;
int n, m; LL a[maxn], tmp[maxn], ans[maxn];
inline void D(LL *a, LL *b) {
    memset(tmp, 0, sizeof tmp);
    for (int i = 1; i <= m; ++i) {
        for (int j = 1; j <= m / i; ++j)
            tmp[i * j] = (tmp[i  * j] + a[i] * b[j] % mod) % mod;
    }
    memcpy(a, tmp, sizeof tmp);
}

void work() {
    for (int i = 1; i <= m; ++i) a[i] = 1;
    ans[1] = 1;
    while (n) {
        if (n & 1) D(ans, a);
        D(a, a);
        n >>= 1;
    }
    for (int i = 1; i <= m; ++i) ans[i] = (ans[i - 1] + ans[i]) % mod;
}

int main() {
    Ri(n); Ri(m);
    work();
    cout << ans[m] << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
namespace IO
{
    const int buf_size=1<<20;
    char buf[buf_size],*S,*T;
    inline char read_char()
    {
        if(S==T)
            T=(S=buf)+fread(buf,1,buf_size,stdin);
        return S!=T?*(S++):EOF;
    }
    bool flag_EOF;
    inline int read_int()
    {
        char c=read_char();
        bool neg=false;
        while(c<'0'||c>'9')
        {
            if(c==EOF)
            {
                flag_EOF=true;
                return 0;
            }
            neg=(c=='-');
            c=read_char();
        }
        int x=0;
        while(c>='0'&&c<='9')
        {
            x=x*10+(c^48);
            c=read_char();
        }
        return neg?-x:x;
    }
    inline void read_string(char *s)
    {
        char c=read_char();
        while(c<'a'||c>'z')
        {
            if(c==EOF)
            {
                flag_EOF=true;
                return;
            }
            c=read_char();
        }
        while(c>='a'&&c<='z')
        {
            *(s++)=c;
            c=read_char();
        }
        *s='\0';
    }
    inline double read_double()
    {
        char c=read_char();
        bool neg=false;
        while(c<'0'||c>'9')
        {
            if(c==EOF)
            {
                flag_EOF=true;
                return 0;
            }
            neg=(c=='-');
            c=read_char();
        }
        double x=0;
        while(c>='0'&&c<='9')
        {
            x=x*10+(c^48);
            c=read_char();
        }
        if(c=='.')
        {
            c=read_char();
            double eps=1;
            while(c>='0'&&c<='9')
            {
                eps*=0.1;
                x+=eps*(c^48);
                c=read_char();
            }
        }
        return neg?-x:x;
    }
    char fw[buf_size];
    int pw;
    inline void flush()
    {
        fwrite(fw,1,pw,stdout);
        pw=0;
    }
    inline void write_char(char x)
    {
        if(pw==buf_size)
            flush();
        fw[pw++]=x;
    }
    char st[26];
    int top;
    inline void write_int(int x)
    {
        if(!x)
        {
            write_char('0');
            return;
        }
        if(x<0)
        {
            write_char('-');
            x=-x;
        }
        while(x)
        {
            st[++top]=x%10^48;
            x/=10;
        }
        while(top>0)
            write_char(st[top--]);
    }
    inline void write_string(const char *s)
    {
        for(int i=0;s[i];++i)
            write_char(s[i]);
    }
    inline void write_double(double x,int cnt_digits,bool mark=true)
    {
        if(x<0)
        {
            write_char('-');
            x=-x;
        }
        if(mark)
            x+=5*pow(0.1,cnt_digits+1);
        write_int(int(x));
        if(cnt_digits>0)
        {
            write_char('.');
            for(int i=1;i<=cnt_digits;++i)
            {
                x-=int(x),x*=10;
                write_char(int(x)^48);
            }
        }
    }
}
const int mod=998244353;
const int max_n=4e5+5;
int fac[max_n],inv[max_n],inv_fac[max_n];
inline void init(int n=4e5)
{
	fac[0]=inv_fac[0]=1;
	fac[1]=inv[1]=inv_fac[1]=1;
	for(int i=2;i<=n;++i)
	{
		fac[i]=1ll*fac[i-1]*i%mod;
		inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;
		inv_fac[i]=1ll*inv_fac[i-1]*inv[i]%mod;
	}
}
inline int C(int n,int m)
{
	if(n<0||m<0||n<m)
		return 0;
	return 1ll*fac[n]*inv_fac[m]%mod*inv_fac[n-m]%mod;
}
int ans;
vector<int> cnt;
int N,M;
inline void solve(int x)
{
	cnt.clear();
	for(int i=2;1ll*i*i<=x;++i)
	{
		if(x%i==0)
		{
			int c=0;
			while(x%i==0)
				x/=i,++c;
			cnt.push_back(c);
		}
	}
	if(x!=1)
		cnt.push_back(1);
	int res=1;
	for(int i=0;i<int(cnt.size());++i)
	{
		int x=cnt[i];
		res=1ll*res*C(N+x-1,N-1)%mod;
	}
	ans=(ans+res)%mod;
}
int main()
{
	init();
	scanf("%d%d",&N,&M);
	for(int i=1;i<=M;++i)
		solve(i);
	printf("%d\n",ans);
    IO::flush();
    return 0;
}


#include <bits/stdc++.h>
/* #include <atcoder/lazysegtree> */
using namespace std;
/* using namespace atcoder; */
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vint = vector<int>;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
    for (long long i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) \
    for (long long i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define VREP(s, ite) for (auto ite = s.begin(); ite != s.end(); ++ite)
#define FI first
#define SE second
#define ALL(v) v.begin(), v.end()
#define endl "\n"
#define ciosup  \
    cin.tie(0); \
    ios::sync_with_stdio(false);
#define eb emplace_back
constexpr ll INF = 1e15 + 7LL;
constexpr ll MOD = 1e9 + 7LL;

template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
    for (int i = 0; i < v.size(); ++i) {
        is >> v[i];
    }
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    if (v.size() == 0) return os;
    for (int i = 0; i < v.size() - 1; ++i) {
        os << v[i] << " ";
    }
    os << v[v.size() - 1];
    return os;
}
template <typename... T>
void In(T&&... args) {
    (std::cin >> ... >> args);
}
template <typename T, typename ...Tail>
void Out(T head, Tail... tail) {
    std::cout << head;
    if constexpr(sizeof...(tail) > 0) {
        std::cout << ' ';
        Out(tail...);
    } else {
        std::cout << '\n';
    }
}
template <typename T>
T& chmin(T& val, T val2) {
    return val = min(val, val2);
}
template <typename T>
T& chmax(T& val, T val2) {
    return val = max(val, val2);
}

void solve() {
    int n; In(n);

    ll yh=2e15,yl=-2e15, acm = 0;
    REP(i,n) {
        ll a, t; In(a,t);
        if (t == 1) {
            acm += a;
            yh += a;
            yl += a;
        } else if (t == 2) {
            if (a > yl) {
                yl = a;
                if (yl > yh) yh = yl;
            }
        } else {
            if (a < yh) {
                yh = a;
                if (yl > yh) yl = yh;
            }
        }
    }
    ll xh = yh - acm, xl = yl - acm;
    int q; In(q);
    vll x(q); In(x);
    REP(i,q) {
        if (yl == yh) {
            Out(yl);
        } else if (x[i] <= xl) {
            Out(yl);
        } else if (x[i] >= xh) {
            Out(yh);
        } else {
            Out(x[i]+acm);
        }
    }
}

int main() {
    solve();
    char tmp;
    while (cin >> tmp) {
        cin.putback(tmp);
        solve();
    }
}

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

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

	int n;
	cin >> n;

	vector<int> a(n), t(n);
	for (int i = 0; i < n; i++) cin >> a[i] >> t[i];

	vector<long long> pref(n);
	pref[0] = (t[0] == 1) * a[0];
	for (int i = 1; i < n; i++) {
		pref[i] = (t[i] == 1) * a[i] + pref[i - 1];
	}

	vector<int> p(n);
	iota(p.begin(), p.end(), 0);

	set<pair<long long, int>> mx, mn;
	for (int i = n - 1; i >= 0; i--) {
		if (t[i] == 1) {

		} else {
			long long bound = a[i] - pref[i];
			auto it1 = mx.lower_bound(make_pair(bound, 0));
			auto it2 = mn.lower_bound(make_pair(bound + 1, 0));
			it2 = it2 != mn.begin() ? prev(it2) : mn.end();

			int pos1 = it1 != mx.end() ? it1->second : n, pos2 = it2 != mn.end() ? it2->second : n;
			int pos = min(pos1, pos2);

			if (pos != n) {
				p[i] = p[pos];
			}

			if (t[i] == 2) {
				auto ub = mx.lower_bound(make_pair(bound + 1, 0));
				for (auto it = mx.begin(); it != ub;) {
					it = mx.erase(it);
				}
				mx.emplace(bound, i);
			} else {
				auto lb = mn.lower_bound(make_pair(bound, 0));
				for (auto it = lb; it != mn.end();) {
					it = mn.erase(it);
				}
				mn.emplace(bound, i);
			}
		}
	}

	int q;
	cin >> q;

	while (q--) {
		int x;
		cin >> x;

		auto it1 = mx.lower_bound(make_pair(x, 0));
		auto it2 = mn.upper_bound(make_pair(x, 0));
		it2 = it2 != mn.begin() ? prev(it2) : mn.end();

		int pos1 = it1 != mx.end() ? it1->second : n, pos2 = it2 != mn.end() ? it2->second : n;
		int pos = min(pos1, pos2);

		if (pos != n) {
			cout << a[p[pos]] + pref.back() - pref[p[pos]] << '\n';
		} else {
			cout << x + pref.back() << '\n';
		}
	}
	return 0;
}