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

typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 100050;

int c[N];
bool isprime[N];
vector<int> prime;

void init()
{
    memset(isprime,false,sizeof(isprime));
    for(ll i = 2;i < N; ++i)
    {
        if(isprime[i]) continue;
        prime.push_back(i);
        for(ll j = i * i;j < N; j += i)
            isprime[j] = true;
    }
}

int main()
{
    int n;
    init();
    while(scanf("%d",&n)!=EOF)
    {
        int ans = 1;
        for(int i = 0;i < n; ++i)
        {
            int v = i + 2;
            int len = prime.size();
            c[i] = 0;
            for(int j = 0;j < len; ++j)
            {
                int p = prime[j];
                if(p > v) break;
                while(v % p == 0)
                {
                    v /= p;
                    ++c[i];
                }
            }
            ans = max(ans,c[i]);
        }
        printf("%d\n",ans);
        for(int i = 0;i < n; ++i)
            printf("%d%s",c[i],i == n - 1 ? "\n" : " ");
    }
    return 0;
}


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

typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 100050;

int c[N];

int main()
{
    int n;
    scanf("%d",&n);
    int cnt = 1;
    for(int i = 2;i <= n + 1; ++i)
    {
        int ans = 0;
        bool flag = true;
        for(ll j = 2;j * j <= i; ++j)
            if(i % j == 0)
            {
                flag = false;
                break;
            }
        if(flag) c[i - 2] = 1;
        else c[i - 2] = 2;
    }
    printf("%d\n",n >= 3 ? 2 : 1);
    for(int i = 0;i < n; ++i)
        printf("%d%s",c[i],i == n - 1 ? "\n" : " ");
    return 0;
}


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

typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 100050;

int c[N];

int main()
{
    int n;
    scanf("%d",&n);
    for(int i = 2;i <= n + 1; ++i)
        c[i] = 1;
    int ans = 1;
    for(ll i = 2;i <= n + 1; ++i)
    {
        for(ll j = i * i;j <= n + 1;j += i)
            ++c[j];
        ans = max(ans,c[i]);
    }
    printf("%d\n",ans);
    for(int i = 2;i <= n + 1; ++i)
        printf("%d%s",c[i],i == n + 1 ? "\n" : " ");
    return 0;
}


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

typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 100050;

int c[N];
bool vis[N];
int tmp[N];

int main()
{
    int n;
    scanf("%d",&n);
    for(int i = 0;i < n; ++i)
        tmp[i] = i + 2;
    int sum = 0;
    int m = n;
    int ans = 0;
    while(sum < n)
    {
        ++ans;
        for(int i = 0;i < m; ++i)
            vis[i] = false;
        vis[0] = true;
        ++sum;
        for(int i = 1;i < m; ++i)
            if(tmp[i] % tmp[0] != 0)
                vis[i] = true,++sum;
        int k = 0;
        for(int i = 0;i < m; ++i)
            if(vis[i] == true)
                c[tmp[i] - 2] = ans;
            else
                tmp[k++] = tmp[i];
        m = k;
    }
    printf("%d\n",ans);
    for(int i = 0;i < n; ++i)
        printf("%d%s",c[i],i == n + 1 ? "\n" : " ");
    return 0;
}


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

typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 100050;

int c[N];

int main()
{
    int n;
    scanf("%d",&n);
    int cnt = 1;
    for(int i = 2;i <= n + 1; ++i)
    {
        int ans = 0;
        for(ll j = 2;j * j <= i; ++j)
            if(i % j == 0)
                ans = max(ans,max(c[j - 2],c[i / j - 2]));
        c[i - 2] = ans + 1;
        cnt = max(cnt,ans + 1);
    }
    printf("%d\n",cnt);
    for(int i = 0;i < n; ++i)
        printf("%d%s",c[i],i == n - 1 ? "\n" : " ");
    return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], cnt;

void sieve(int mx)  {
	hsh[2] = -1;
	for (int i = 3 ; i <= mx ; i += 2)  {
		if (!hsh[i])  {
			hsh[i] = -1;
			cnt++;
			for (int j = 3 ; j*i <= mx ; j += 2)  {
				hsh[j*i] = 1;
			}
		}
	}
}
int main()  {

	int n, ans, color;
	scan(n);
	sieve(n+1);
	ans = n-cnt;
	print(ans);
	color = 1;
	if (n == 1)  printf("%d\n", 1);
	else
	REP(i,2,n+1)  {
		if (hsh[i] != -1)  color++;
		printf("%d ", color);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], ans;

void sieve(int mx)  {
	REP(i,2,mx)  {
		if (!hsh[i])  {
			for (int j = i+i ; j <= mx ; j += i)  {
				hsh[j]++;
				ans = max(ans, hsh[j]);
			}
		}
	}
}
int main()  {

	int n;
	scan(n);
	sieve(n+1);
	print(ans+1);
	REP(i,2,n+1)  {
		printf("%d ", hsh[i]+1);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], cnt;

void sieve(int mx)  {
	for (int i = 3 ; i <= mx ; i += 2)  {
		if (!hsh[i])  {
			hsh[i] = -1;
			cnt++;
			for (int j = 3 ; j*i <= mx ; j += 2)  {
				hsh[j*i] = 1;
			}
		}
	}
}
int main()  {

	int n, ans, color;
	scan(n);
	sieve(n+1);
	ans = n-cnt;
	print(ans);
	color = 0;
	REP(i,2,n+1)  {
		if (hsh[i] != -1)  color++;
		printf("%d ", color);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], ans;

void sieve(int mx)  {
	REP(i,2,mx)  {
		if (!hsh[i])  {
			for (int j = i+i ; j <= mx ; j += i)  {
				hsh[j] = 1;
			}
		}
	}
}
int main()  {

	int n;
	scan(n);
	sieve(n+1);
	if (n == 1 || n == 2)  ans = 1;
	else  ans = 2;
	print(ans);
	REP(i,2,n+1)  {
		printf("%d ", hsh[i]+1);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], cnt;

void sieve(int mx)  {
	for (int i = 3 ; i <= mx ; i += 2)  {
		if (!hsh[i])  {
			hsh[i] = -1;
			cnt++;
			for (int j = 3 ; j*i <= mx ; j += 2)  {
				hsh[j*i] = 1;
			}
		}
	}
}
int main()  {

	int n, ans, color;
	scan(n);
	sieve(n+1);
	ans = n-cnt+1;
	print(ans);
	color = 0;
	REP(i,2,n+1)  {
		if (hsh[i] != -1)  color++;
		printf("%d ", color);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], ans;

void sieve(int mx)  {
	REP(i,2,mx)  {
		if (!hsh[i])  {
			for (int j = i+i ; j <= mx ; j += i)  {
				hsh[j] = 1;
			}
		}
	}
}
int main()  {

	int n;
	scan(n);
	sieve(n+1);
	if (n == 1)  ans = 1;
	else  ans = 2;
	print(ans);
	REP(i,2,n+1)  {
		printf("%d ", hsh[i]+1);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int color[MAX], cnt, ans;

void sieve(int mx)  {
	int col;
	REP(i,2,mx)  {
		col = 0;
		if (!color[i])
		for (int j = i ; j <= mx ; j += i)  {
			if (!color[j])  color[j] = ++col;
		}
		ans = max(ans, col);
	}
}
int main()  {

	int n;
	scan(n);
	sieve(n+1);
	printf("%d\n", ans);
	REP(i,2,n+1)  {
		printf("%d ", color[i]);
	}
	return 0;
}


/*--.--.--.--.--.--.--.--.--.--.--.--.--*
 *  	By-Rohit Singh					 *
 *    CS , MNNIT Allahabad               *
 *		rohitmnnit1459@gmail.com         *
 *--.--.--.--.--.--.--.--.--.--.--.--.--*/

#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <set>
#include <limits.h>
#include <assert.h>
//#include <unordered_map>
using namespace std;

#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define null NULL
#define ll long long
#define llu unsigned long long
#define MAX 200005
#define mod 1000000007
#define inf 1e16
#define pp pair <int, int>

typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <ldb, ldb> pdd;

const db PI = 3.141592653589793238;
#define abs(x) ((x)>0?(x):-(x))
//#define pop pop_back()
#define scan(x) scanf("%d",&x)
#define print(x) printf("%d\n",x)
#define scanll(x) scanf("%lld",&x)
#define printll(x) printf("%lld\n",x)

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define PER(i,a,b) for(int i=b;i>=a;i--)
ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//**********************************************HAPPY CODDING*****************************************************//
int hsh[MAX], ans;

void sieve(int mx)  {
	REP(i,2,mx)  {
		if (!hsh[i])  {
			for (int j = i+i ; j <= mx ; j += i)  {
				hsh[j] = 1;
			}
		}
	}
}
int main()  {

	int n;
	scan(n);
	sieve(n+1);
	print(2);
	REP(i,2,n+1)  {
		printf("%d ", hsh[i]+1);
	}
	return 0;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(ll i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1;
      for(ll j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=2 ;
       }
   }
  }
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      (n==1?cout<<"1\n":cout<<"2\n");
      for(ll i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(int i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1;
      for(int j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=2 ;
       }
   }
  }
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      puts(n==1?"1":"2");
      for(int i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(int i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1,k=2;
      for(int j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=k , k++,cnt++;
      }
   }
  }

}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      cout<<cnt<<"\n";
      for(int i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(ll i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1;
      for(ll j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=2 ;
       }
   }
  }
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      (n==1||n==2?cout<<"1\n":cout<<"2\n");
      for(ll i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(int i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1;
      for(int j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=2 ;
       }
   }
  }
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      cout<<"2\n";
      for(int i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
    cnt=1;
   for(int i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        arr[i]=1;
      for(int j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=2 ;
       }
   }
  }
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      (n==1?cout<<"1\n":cout<<"2\n");
      for(int i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>
#include <sstream>
using namespace std;
#include <bits/stdc++.h>
#include<utility>
#include <algorithm>
#include<iterator>
#define  go return 0
#define rep(i,n) for(int i=0;i<n;++i)
#define rep(j,n) for(int j=0;j<n;++j)
#define REP(i,n) for(int i=1;i<=n;++i)
#define all(v)   ((v).begin()), ((v).end())
#define len(s)   ((int)s.size())
#define F first
#define S second
#define pb push_back
#define pf push_front
#define mp make_pair
typedef long long ll;
typedef double db;
typedef vector<ll> ve;
typedef vector<pair<ll ,ll> >vepa;
typedef set<ll>se;
typedef map<ll,ll> mpp;
const ll N=1e6+5 ,OO=1e9+5;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
ll TC,n,mx,cnt,sum,k,arr[N];
bool f,vis[N];
void sieve(){
   for(int i=2 ; i<=n+1 ; i++)
  {
      if(!arr[i]){
        cnt++ , arr[i]=1,k=2;
      for(int j=i*i ; j<=n+1 ; j+=i)
      {
          arr[j]=k , k++;
      }
   }
  }

}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
      cin>>n;
      sieve();
      cout<<cnt<<"\n";
      for(int i=2 ; i<=n+1 ; i++)
        cout<<arr[i]<<" ";
go;
}


#include <iostream>

using namespace std;

int main()
{
int n; cin >> n;
int a[n];

for (int i = 0; i < n + 2; ++i)
	a[i] = 1;

for (int i = 2; i < n + 2; ++i) {
if (a[i] == 1)
for (int j = 2; j <= (n + n) / i; ++j)
a[i*j] = 2;
}

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
int n; cin >> n;
int a[200000];

for (int i = 0; i < n + 2; ++i)
	a[i] = 1;

for (int i = 2; i < n + 2; ++i) {
if (a[i] == 1)
for (int j = 2; j <= (n + n) / i; ++j)
a[i*j] = 2;
}

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
int n; cin >> n;
int a[n];

for (int i = 0; i < n + 2; ++i)
	a[i] = 1;

for (int i = 2; i < n + 2; ++i) {
if (a[i] == 1)
for (int j = 2; j <= (n + 1) / i; ++j)
a[i*j] = 2;
}

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main()
{
int n; cin >> n;
int a[200002];

for (int i = 2; i < n + 2; ++i)
a[i]=1;

for (int i = 2; i < n + 2; ++i)
for (int j = i; j < sqrt(n + 2)+2; ++j)
	a[i*j] = 2;

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main()
{
int n; cin >> n;
int a[100001];

for (int i = 2; i < n + 2; ++i)
a[i]=1;

for (int i = 2; i < n; ++i)
for (int j = i; j < n; ++j)
	a[i*j] = 2;

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
int n; cin >> n;
int a[200000];

for (int i = 0; i < n + 2; ++i)
	a[i] = 1;

if 	(n > 2) {
for (int i = 2; i < n + 2; ++i) {
if (a[i] == 1)
for (int j = 2; j <= (n + 2) / i; ++j)
a[i*j] = 2;
}

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;
}
else {
cout << 1 << endl;
for (int i = 0; i < n; ++i)
cout << 1 << " ";
cout << endl;
}

    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main()
{
int n; cin >> n;
int a[200002];

for (int i = 2; i < n + 2; ++i)
a[i]=1;

for (int i = 2; i < sqrt(n + 2); ++i)
for (int j = i; j < sqrt(n + 2); ++j)
	a[i*j] = 2;

cout << 2 << endl;
for (int i = 2; i < n + 2; ++i)
cout << a[i] << " ";

cout << endl;

    return 0;
}


#include <iostream>
using namespace std;
int main(void){
    long long t;
    long long a[3];
    cin>>t;
    for(int i =0;i<t;i++){
        cin>>a[0]>>a[1]>>a[2];
        cout<<a[0]+a[1]+a[2]-1<<endl;
    }
}


#include <iostream>
using namespace std;
int main(void){
    int t;
    int a[3];
    cin>>t;
    for(int i =0;i<t;i++){
        cin>>a[0]>>a[1]>>a[2];
        cout<<a[0]+a[1]+a[2]-1<<endl;
    }
}


#include <iostream>
using namespace std;
int main()
{
    int t,a,b,c, x1, x2, max;
    cin >> t;
    for (int i = 1; i <= t; i++)
    {
        cin >> a>>b>>c;
        x1 = a + b + c;
        max = a;
        if (b > max) max = b;
        if (c > max) max = c;
        if (max == a)
        {
            x2 = max- b - c;
        }
        else
        {
            if (max == b)
            {
                x2 = max - a - c;
            }
            else x2 = max - a - b;
        }
        if (x2 < 0) x2 = 0;
        cout << x2+1 << endl;

    }
}


#include <iostream>
using namespace std;
int main()
{
    int t,a,b,c;
    cin >> t;
    for (int i = 1; i <= t; i++)
    {
        cin >> a>>b>>c;
        cout << a + b <<endl;
    }
}


#include <iostream>
using namespace std;
int main()
{
    int t,a,b,c;
    cin >> t;
    for (int i = 1; i <= t; i++)
    {
        cin >> a>>b>>c;
        cout << 1 <<endl;
    }
}


#include<iostream>
using namespace std;

int main()
{
	int a[3],t,i;
	cin>>t;
	while(t>0)
	{

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

	}

	cout<<(a[0]+a[1]+a[2])-1<<endl;
	}
	return 0;
}


#include<iostream>
using namespace std;

int main()
{
	int a[3],t,i,sum=0;
	cin>>t;
	while(t>0)
	{sum=0;

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

	cout<<sum-1<<endl;
	}
	return 0;
}


#include<iostream>
using namespace std;

int main()
{
	int a,t,i,sum;
	cin>>t;
	while(t>0)
	{long long sum=0;

	for(i=0;i<3;i++)
	{
	cin>>a;
	sum=sum+a;
	}

	cout<<sum-1<<endl;
	t--;
	}
	return 0;
}


#include<iostream>
using namespace std;

int main()
{
	int a,t,i,sum;
	cin>>t;
	while(t>0)
	{sum=0;

	for(i=0;i<3;i++)
	{
	cin>>a;
	sum=sum+a;
	}

	cout<<sum-1<<endl;
	t--;
	}
	return 0;
}


#include<iostream>
using namespace std;

int main()
{int t,a[3],r,i,m;

cin>>t;
while(t>0)
{

for(i=0;i<3;i++)
cin>>a[i];

m=a[0];
for(i=1;i<3;i++)
{if(a[i]>m)
m=a[i];
}
cout<<m;

t--;
}

}


#include<iostream>
using namespace std;

int main()
{
	int a[3],t,i;
	cin>>t;
	while(t>0)
	{sum=0;

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

	}

	cout<<(a[0]+a[1]+a[2])-1<<endl;
	}
	return 0;
}


#include<iostream>
using namespace std;

int main()
{int t,a[3],r,i,m;

cin>>t;
while(t>0)
{

for(i=0;i<3;i++)
cin>>a[i];

m=a[0];
for(i=1;i<3;i++)
{if(a[i]>m)
m=a[i];
}
cout<<m-1;

t--;
}

}


#include "pch.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <chrono>
#include <list>
#include <queue>

#define rep(i, l, r) for(int64_t i = l; i < r; ++i)
#define rrep(i, r, l) for(int64_t i = r - 1; i >= l; --i)
#define pb(o) push_back(o)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define gap <<" "

using matrix = std::vector<std::vector<bool>>;
int64_t mod = 998244353;

uint32_t nod(uint32_t a, uint32_t b)
{
	while (b)
	{
		a %= b;
		std::swap(a, b);
	}
	return a;
}

int64_t binm(int64_t a, int64_t n) {
	int64_t res = 0;
	while (n) {
		if (n & 1)
			res = (res + a) % mod;

		a = (a + a)%mod;
		n >>= 1;
	}
	return res;
}

void solve()
{
	int a, b, c;
	std::cin >> a >> b >> c;
	std::cout << (a + b + c - 2) << "\n";
}

int main()
{
	int64_t t = 1;
	std::cin >> t;
	rep(_, 0, t) solve();
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <chrono>
#include <list>
#include <queue>

#define rep(i, l, r) for(int64_t i = l; i < r; ++i)
#define rrep(i, r, l) for(int64_t i = r - 1; i >= l; --i)
#define pb(o) push_back(o)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define gap <<" "

using matrix = std::vector<std::vector<bool>>;
int64_t mod = 998244353;

uint32_t nod(uint32_t a, uint32_t b)
{
	while (b)
	{
		a %= b;
		std::swap(a, b);
	}
	return a;
}

int64_t binm(int64_t a, int64_t n) {
	int64_t res = 0;
	while (n) {
		if (n & 1)
			res = (res + a) % mod;

		a = (a + a)%mod;
		n >>= 1;
	}
	return res;
}

void solve()
{
	int a, b, c;
	std::cin >> a >> b >> c;
	std::cout << (a + b + c - 2) << "\n";
}

int main()
{
	int64_t t = 1;
	std::cin >> t;
	rep(_, 0, t) solve();
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <chrono>
#include <list>
#include <queue>

#define rep(i, l, r) for(int64_t i = l; i < r; ++i)
#define rrep(i, r, l) for(int64_t i = r - 1; i >= l; --i)
#define pb(o) push_back(o)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define gap <<" "

using matrix = std::vector<std::vector<bool>>;
int64_t mod = 998244353;

uint32_t nod(uint32_t a, uint32_t b)
{
	while (b)
	{
		a %= b;
		std::swap(a, b);
	}
	return a;
}

int64_t binm(int64_t a, int64_t n) {
	int64_t res = 0;
	while (n) {
		if (n & 1)
			res = (res + a) % mod;

		a = (a + a)%mod;
		n >>= 1;
	}
	return res;
}

void solve()
{
	uint64_t a, b, c;
	std::cin >> a >> b >> c;
	std::cout << (a + b + c - 2) << "\n";
}

int main()
{
	int64_t t = 1;
	std::cin >> t;
	rep(_, 0, t) solve();
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
	long long int a, b, c, d,t;
	cin >> t;
	for (int i = 0;i<t;i++)
	{
		cin >> a >> b >> c;
		d = max(max(a,b),c);
		while (d>=a+b+c || a>=b+c+d || b>=a+c+d || c>=a+b+d)
		{
			d++;
		}
		cout << d<<'\n';
	}
}


#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
	long long int a, b, c, d,t;
	cin >> t;
	for (int i = 0;i<t;i++)
	{
		cin >> a >> b >> c;
		d = 1;
		while (d>=a+b+c || a>=b+c+d || b>=a+c+d || c>=a+b+d)
		{
			d++;
		}
		cout << d<<'\n';
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
const int int_inf = 2147483646;
const ll ll_inf = 9223372036854775806;
#include <cmath>
#include <string>
#include <functional>
#include <stack>
#include <queue>
#include <deque>

int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int T;
	int a, b, c;

	cin >> T;
	while (T--) {
		cin >> a >> b >> c;
		cout << (a + b + c - 1) << '\n';
	}

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
const int int_inf = 2147483646;
const ll ll_inf = 9223372036854775806;
#include <cmath>
#include <string>
#include <functional>
#include <stack>
#include <queue>
#include <deque>

int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int T;
	ll a, b, c;

	cin >> T;
	while (T--) {
		cin >> a >> b >> c;
		cout << (a + b + c - 1) << '\n';
	}

	return 0;
}


#include<iostream>

using namespace std;
int main() {
	int t;
	cin >> t;
	while (t--) {
		int a, b, c;
		cin >> a >> b >> c;
		int d;
		d = a + b - 1;
		cout << d << "\n";
	}
}


#include<iostream>
#include<math.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while (t--) {
		int a, b, c;
		cin >> a >> b >> c;
		int d;
		d = sqrt(pow(b, 2) + pow((c - a), 2));
		cout << d << "\n";
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

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

const double pi = 3.14159265358979323846;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t;
	cin >> t;
	while (t--) {
		long long a, b, c;
		cin >> a >> b >> c;

		/*for (long long i = 1, end = arr[0] + arr[1] + arr[2]; i < end; ++i) {
			if (i + arr[0] + arr[2] > arr[1] && i + arr[1] + arr[2] > arr[0] && i + arr[0] + arr[1] > arr[2]) {
				cout << i << '\n';
				break;
			}
		}*/
		cout << max({ 0ll, c - a - b, b - a - c, a - b - c }) + 1 << '\n';
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

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

const double pi = 3.14159265358979323846;

int arr[3];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t;
	cin >> t;
	while (t--) {
		for (int i = 0; i < 3; ++i)cin >> arr[i];
		sort(arr, arr + 3);
		for (int i = max(1, arr[2] - arr[1] - arr[0] + 1), end = arr[0] + arr[1] + arr[2]; i < end; ++i) {
			if (i + arr[0] + arr[2] > arr[1] && i + arr[1] + arr[2] > arr[0]) {
				cout << i << '\n';
				break;
			}
		}
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

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

const double pi = 3.14159265358979323846;

long long arr[3];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t;
	cin >> t;
	while (t--) {
		for (int i = 0; i < 3; ++i)cin >> arr[i];
		for (long long i = 1, end = arr[0] + arr[1] + arr[2]; i < end; ++i) {
			if (i + arr[0] + arr[2] > arr[1] && i + arr[1] + arr[2] > arr[0] && i + arr[0] + arr[1] > arr[2]) {
				cout << i << '\n';
				break;
			}
		}
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

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

const double pi = 3.14159265358979323846;

int arr[3];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t;
	cin >> t;
	while (t--) {
		for (int i = 0; i < 3; ++i)cin >> arr[i];
		for (int i = 1, end = arr[0] + arr[1] + arr[2]; i < end; ++i) {
			if (i + arr[0] + arr[2] > arr[1] && i + arr[1] + arr[2] > arr[0] && i + arr[0] + arr[1] > arr[2]) {
				cout << i << '\n';
				break;
			}
		}
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <iterator>
#include <numeric>
#define ll long long
using namespace std;

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		cout << max(max(a, b), c) << endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<limits.h>
#include<string>
#include<queue>
#include<stack>
#include<fstream>
#include<iomanip>
#include<cmath>
using namespace std;
#define ll long long

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	long double a, b, c;
	int t;
	cin >> t;
	vector<int>v(3);
	for (int i = 0; i < t; ++i) {
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		a = v[0]; b = v[1]; c = v[2];
		cout <<fixed<< setprecision(9)<<ll(ceil(sqrtl(b * b + (a - c) * (a - c)))) << endl;
	}

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<limits.h>
#include<string>
#include<queue>
#include<stack>
#include<fstream>
#include<cmath>
using namespace std;
#define ll long long

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	ll a, b, c;
	int t;
	cin >> t;
	for (int i = 0; i < t; ++i) {
		cin >> a >> b >> c;
		cout << (a + b + c) / 3 << endl;
	}

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<limits.h>
#include<string>
#include<queue>
#include<stack>
#include<fstream>
#include<cmath>
using namespace std;
#define ll long long

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	long double a, b, c;
	int t;
	cin >> t;
	vector<int>v(3);
	for (int i = 0; i < t; ++i) {
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		a = v[0]; b = v[1]; c = v[2];
		cout << ceil(sqrtl(b * b + (a - c) * (a - c))) << endl;
	}

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<limits.h>
#include<string>
#include<queue>
#include<stack>
#include<fstream>
#include<cmath>
using namespace std;
#define ll long long

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int a, b, c;
	int t;
	cin >> t;
	for (int i = 0; i < t; ++i) {
		cin >> a >> b >> c;
		cout << (a + b + c) / 3 << endl;
	}

}


#include <iostream>
using namespace std;
int main()
{
	long a, b, c, t;
	cin >> t;
	for (int i = 0; i < t; i++)
	{
		cin >> a >> b >> c;
		cout << a + 1 << endl;
	}
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int a, b, c, t;
	cin >> t;
	for (int i = 0; i < t; i++)
	{
		cin >> a >> b >> c;
		cout << max(a, max(b, c)) << endl;
	}
	return 0;
}


#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	int a, b, c, t;
	cin >> t;
	for (int i = 0; i < t; i++)
	{
		cin >> a >> b >> c;
		cout << max(a, max(b, c)) << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	int a, b, c, t;
	cin >> t;
	for (int i = 0; i < t; i++)
	{
		cin >> a >> b >> c;
		cout << a + 1 << endl;
	}
	return 0;
}


#include <iostream>
#include <string.h>
#include<algorithm>
#include <math.h>
using namespace std;
int main()
{
    static long long no;
    cin>>no;
    while(no--)
    {
        long long a[4],ans=0;
        for(int i=0;i<3;i++)
        cin>>a[i];
        sort(a,a+2);

        ans=sqrt((a[0]*a[0])+((a[2]-a[1])*(a[2]-a[1])));
        cout<<ans+1<<endl;

    }

	return 0;
}


#include <iostream>
#include <string.h>
#include<algorithm>
#include <math.h>
using namespace std;
int main()
{
    static long long no;
    cin>>no;
    while(no--)
    {
        long long a[4];
        for(int i=0;i<3;i++)
        cin>>a[i];
        sort(a,a+2);

        cout<<a[2]+1<<endl;

    }

	return 0;
}


#include <iostream>
#include <string.h>
#include<algorithm>
#include <math.h>
using namespace std;
int main()
{
    static long long no;
    cin>>no;
    while(no--)
    {
        long long a[4];
        for(int i=0;i<3;i++)
        cin>>a[i];
        sort(a,a+2);
        if((a[1]+1)!=a[2])
        cout<<a[1]+1<<endl;
        else
        cout<<a[1]+2<<endl;

    }

	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <vector>
using namespace std;
int main()
{
	int t;
	scanf("%d", &t);
	while(t) {
		--t;
		int a[10];
		scanf("%d%d%d", &a[1], &a[2], &a[3]);
		sort(a + 1, a + 4);
		int mi = max(0, a[3] - a[1] - a[2]);
		int ma = a[1] + a[2] + a[3];
		printf("%d\n", mi + 1);
	}
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    int t;
    cin>>t;

    for(int i = 0; i<t;i++){
        int a, b, c;
        cin>>a>>b>>c;

        int m1, m2, m3;

        m1 = max(a,max(b,c));
        m3 = min(a,min(b,c));
        m2 = a + b + c - m1 - m3;

        cout<<max(m1-m2-m3+1, 1) << endl;
    }

    return 0;
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    int t;
    cin>>t;

    for(int i = 0; i<t;i++){
        int a, b, c;
        cin>>a>>b>>c;

        int m1, m2, m3;

        m1 = max(a,max(b,c));
        m3 = min(a,min(b,c));
        m2 = a + b + c - m1 - m3;

        cout<<m1-m2-m3+1 << endl;
    }

    return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
using namespace std;
using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vpii = vector<pii>; using vpll = vector<pll>;
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { for (const auto &x : v) os << x << " "; return os << endl; }
ll ceil_div(ll a, ll b) { return (a + b - 1) / b; }

void solve() {
	int a, b, c;
	cin >> a >> b >> c;
	long long a1 = sqrt(3LL*(a*a + b*b + c*c)) - 1;
	long long a2 = sqrt(sqrt(27LL*(a*a*a*a + b*b*b*b + c*c*c*c)));
	long long d = min(a1, a2);
	int t1 = 3*(a*a + b*b + c*c) - d*d;
	int t2 = 27*(a*a*a*a + b*b*b*b + c*c*c*c) - d*d*d*d;
	int ans = d;
	cout << ans << endl;
}

int main(int argc, char const *argv[]) {
#ifndef ONLINE_JUDGE
	ifstream in("inputA.txt");
	cin.rdbuf(in.rdbuf()); //redirect cin to input.txt!
	ofstream out("outA.txt");
	cout.rdbuf(out.rdbuf()); //redirect cout to out.txt!
#endif
	int T;
	cin >> T;
	for (int t=0; t<T; t++)
		solve();
	return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
using namespace std;
using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vpii = vector<pii>; using vpll = vector<pll>;
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { for (const auto &x : v) os << x << " "; return os << endl; }
ll ceil_div(ll a, ll b) { return (a + b - 1) / b; }

// wrong answer Maximum value no less than sum other values on 2

void solve() {
	int a, b, c;
	cin >> a >> b >> c;
	int d = max(a+b-c, b+c-a);
	int ans = d;
	cout << ans << endl;
}

int main(int argc, char const *argv[]) {
#ifndef ONLINE_JUDGE
	ifstream in("inputA.txt");
	cin.rdbuf(in.rdbuf()); //redirect cin to input.txt!
	ofstream out("outA.txt");
	cout.rdbuf(out.rdbuf()); //redirect cout to out.txt!
#endif
	int T;
	cin >> T;
	for (int t=0; t<T; t++)
		solve();
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <list>
#include <map>
#include <cmath>

using namespace std;

using ll = long long;

#define fo(i, n) for (int i = 0; i != n; ++i)
#define fos(i, s, n) for (int i = (s); i < (n); ++i)

void f()
{
	ll a, b, c;
	cin >> a >> b >> c;
	if (a > b && a > c)
		cout << (ll)pow(((b - c) * (b - c) + a * a), 0.5) << '\n';
	else if (b > c && b > a)
		cout << (ll)pow(((a - c) * (a - c) + b * b), 0.5) << '\n';
	else
		cout << (ll)pow(((b - a) * (b - a) + c * c), 0.5) << '\n';
}

int main()
{
	int t = 1;
	cin >> t;
	fo(i, t) f();
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <list>
#include <map>
#include <cmath>

using namespace std;

using ll = long long;

#define fo(i, n) for (int i = 0; i != n; ++i)
#define fos(i, s, n) for (int i = (s); i < (n); ++i)

void f()
{
	ll a, b, c;
	cin >> a >> b >> c;
	if (a > b && a > c)
		cout << pow(((b - c) * (b - c) + a * a), 0.5) << '\n';
	else if (b > c && b > a)
		cout << pow(((a - c) * (a - c) + b * b), 0.5) << '\n';
	else
		cout << pow(((b - a) * (b - a) + c * c), 0.5) << '\n';
}

int main()
{
	int t = 1;
	cin >> t;
	fo(i, t) f();
	return 0;
}


#include <iostream>
#include <algorithm>

int main() {
	using namespace std;
//	ios_base::sync_with_stdio(false), cin.tie(nullptr);

	int T; cin >> T;

	while (T--) {
		int a, b,c; cin >> a >> b >>c;

			cout << min(a+b , min((b+c),(a+c)))-1 << '\n';

	}

	return 0;
}


#include <iostream>
#include <algorithm>

int main() {
	using namespace std;
//	ios_base::sync_with_stdio(false), cin.tie(nullptr);

	int T; cin >> T;

	while (T--) {
		int a, b,c; cin >> a >> b >>c;

			cout << max(a+b , max((b+c),(a+c)))-1 << '\n';

	}

	return 0;
}


#include<stdio.h>
int main()
{
	long long  a, b, c, d, n;
	scanf_s("%lld", &n);
	for (int i = 0; i < n; i++) {
		scanf_s("%lld %lld %lld", &a, &b, &c);
		printf("%lld\n", a + b + c - 1);
	}
	return 0;
}


#include <iostream>
using namespace std;
int main() {
	int t;
	cin >> t;
	while (t--) {
		long long a, b, c;
		cin >> a >> b >> c;
		cout << a + b + c - 1 << "\n";
	}
}


#include <iostream>

using namespace std;

int main(){
    int n;
    cin >> n;
    for(int i = 0 ; i< n;i++){
        int a,b,c;
        cin >> a >> b >> c;
        cout << (a+b+c-1) << endl;
    }
    return 0;
}


#include <iostream>

using namespace std;

int main(){
    int n;
    cin >> n;
    for(int i = 0 ; i< n;i++){
        int a,b,c;
        cin >> a >> b >> c;
        cout << (a+b+c-2) << endl;
    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int64_t t;
    cin >> t;
    while (t--)
    {
        int64_t a, b, c;
        cin >> a >> b >> c;
        cout << a + b + c - 1 << endl;
    }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int a, b, c;
        cin >> a >> b >> c;
        cout << a + b + c - 1 << endl;
    }

    return 0;
}


//
//  codeforce.cpp
//  boj1926bfs
//
//  Created by 강명진 on 2020/10/15.
//

#include <iostream>
using namespace std;

int main(void){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    while (n--){
        long long a,b,c,d;
        cin>>a>>b>>c;
        d=a+b+c-1;
        cout<<d<<'\n';
    }
}


//
//  codeforce.cpp
//  boj1926bfs
//
//  Created by 강명진 on 2020/10/15.
//

#include <iostream>
using namespace std;

int main(void){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    while (n--){
        int a,b,c,d;
        cin>>a>>b>>c;
        d=a+b+c-1;
        cout<<d<<'\n';
    }
}


#include <stdio.h>
int main(void) {
	int t;
	scanf("%d",&t);
	while(t--) {
		int ans=0;
		for(int i=0;i<3;i++) {
			int temp;
			scanf("%d",&temp);
			ans+=temp;
		}
		printf("%d\n",ans-1);
	}
}


#include <stdio.h>
int main(void) {
	int t;
	scanf("%d",&t);
	while(t--) {
		long long ans=0;
		for(int i=0;i<3;i++) {
			long long temp;
			scanf("%lld",&temp);
			ans+=temp;
		}
		printf("%lld\n",ans-1);
	}
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <string>
#include <stdio.h>
#include <set>
#include <sstream>
#include <map>
#include <stack>
#include<deque>
#define INF 0x7f7f7f7f
using namespace std;

int a, b, c, d;
int mx, mi, sum;
int t;

int main()
{
	cin >> t;
	while (t--)
	{
		cin >> a >> b >> c;
		d = (a + b + c) / 2;
		cout << d << endl;
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <string>
#include <stdio.h>
#include <set>
#include <sstream>
#include <map>
#include <stack>
#include<deque>
#define INF 0x7f7f7f7f
using namespace std;

long long int a, b, c, d;
long long int mx, mi, sum;
int t;

int main()
{
	cin >> t;
	while (t--)
	{
		cin >> a >> b >> c;
		mx = max(a, b);
		mx = max(mx, c);
		sum = a + b + c;

		d = abs((sum - mx) - mx) + 1;
		cout << d << endl;
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <string>
#include <stdio.h>
#include <set>
#include <sstream>
#include <map>
#include <stack>
#include<deque>
#define INF 0x7f7f7f7f
using namespace std;

int a, b, c, d;
int t;

int main()
{
	cin >> t;
	while (t--)
	{
		cin >> a >> b >> c;
		d = a + b + c - 1;
		cout << d << endl;
	}
	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int i,a,b,c,d,e;

    cin>>i;
    do {
        cin>>a>>b>>c;
        if(a>b) e=a-b;
        else e=b-a;
    cout << ((e+a+b)+c)/2 << endl;
    i--;
    }while(i>0);
    return 0;
}


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

int main()
{
    int i,a,b,c,d,e;
    int ar[3];
    cin>>i;
    do {
        cin>>a>>b>>c;
        ar[0]=a;
        ar[1]=b;
        ar[2]=c;
    sort(ar,ar+3)
    cout << ar[0]+ar[2]-ar[1]<< endl;
    i--;
    }while(i>0);
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e;
    cin>>a;
    while(a--){
        cin>>b>>c>>d;
        if(b>c)e=b-c;
        else e=c-b;
    cout << (e+b+c)/2 << endl;
    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e;
    cin>>a;
    while(a--){
        cin>>b>>c>>d;
        e=b+c+d-1;
    cout << e << endl;
    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d;
    cin>>a;
    while(a--){
        cin>>b>>c>>d;
        e=(b+c+d)/3;
        if(e<b&&e<c&&e<d)e++;
    cout << e << endl;
    }
    return 0;
}


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

int main()
{
    int i,a,b,c,d,e;
    int ar[3];
    cin>>i;
    do {
        cin>>a>>b>>c;
        ar[0]=a;
        ar[1]=b;
        ar[2]=c;
    sort(ar,ar+3);
    cout << ar[0]+ar[2]-ar[1]<< endl;
    i--;
    }while(i>0);
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e;
    cin>>a;
    while(a--){
        cin>>b>>c>>d;
        e=(b+c+d)/3;
        if(e<b&&e<c&&e<d)e++;
    cout << e << endl;
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		int a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		if (x == 0)
		{
			result = b;
		}
		else
		{
			sum = x * x + b * b;
			result = sqrt(sum);

		}
		cout << floor(result)+1 << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		int a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;

		cout << a+b+c-2 << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		int a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		if (x == 0)
		{
			result = b;
		}
		else
		{
			sum = x * x + b * b;
			result = sqrt(sum);

		}
		cout << ceil(result) << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		int a,b,c,x,sum,result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		sum = x * x + b * b;
		result = sqrt(sum);
		cout << result+1 << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		int a,b,c,x,sum,result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		if (x == 0)
		{
			result = b;
		}
		else
		{
			sum = x * x + b * b;
			result = sqrt(sum);

		}
		cout << result + 1 << endl;
		t--;
	}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		long long a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		if (x == 0)
		{
			result = b;
		}
		else
		{
			sum = x * x + b * b;
			result = sqrt(sum);

		}
		cout << floor(result)+1 << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		long long a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;
		if (a > c)
		{
			x = a - c;
		}
		else
		{
			x = c - a;
		}
		if (x == 0)
		{
			result = b;
		}
		else
		{
			sum = x * x + b * b;
			result = sqrt(sum);

		}
		cout << ceil(result) << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t > 0)
	{
		long long a,b,c,x,sum;
		double result;
		cin >> a;
		cin >> b;
		cin >> c;

		cout << a+b+c-2 << endl;
		t--;
	}
}


#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void main()
{
	long long first, second, third,size;
	cin >> size;
	while (size--){
		cin >> first >> second >> third;
		cout << (first + second + third) - 1 << endl;
	}
}


#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void main()
{
	long long first, second, third,size;
	cin >> size;
	while (size--){
		cin >> first >> second >> third;
		if (first + 2 != second && first + 2 != third){
			cout << first + 2 << endl;
		}
		else if (second + 2 != first && second + 2 != third){
			cout << second + 2 << endl;
		}
		else if (third + 2 != first && third + 2 != second){
			cout << third + 2 << endl;
		}
	}
}


#include <iostream>
#include <algorithm>
using namespace std;
long long T, A, B, C;
int main() {
	scanf("%lld", &T);
	while (T--) {
		scanf("%lld %lld %lld", &A, &B, &C);
		long long ans = A + B + C - 2;
		printf("%lld\n", ans);
	}
}


#include <iostream>
#include <algorithm>
using namespace std;
int T, A, B, C;
int main() {
	scanf("%d", &T);
	while (T--) {
		scanf("%d %d %d", &A, &B, &C);
		long long ans = A + B + C - 2;
		printf("%lld\n", ans);
	}
}


#include<iostream>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int a,b,c;
        cin>>a>>b>>c;
        cout<<a+b+c+2<<"\n";
    }
}


#include<iostream>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long long int a,b,c;
        cin>>a>>b>>c;
        cout<<a+b+c-1<<"\n";
    }
}


#include<iostream>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long int a,b,c;
        cin>>a>>b>>c;
        cout<<a+b+c-1<<"\n";
    }
}


#include<iostream>
#include<algorithm>
//#include<string>
//#include<vector>
using namespace std;

#define ll long long
/*
const int COINS=11; //number of given coins
const int MAX_COINS=30000+1;
int coins[COINS]={5,10,20,50,100,200,1000,2000,5000,10000};
ll mem[COINS][MAX_COINS];

ll dollars(int,int);
*/
//int solve(int);

int main()
{
    int t=0;
    cin>>t;
    while(t--)
    {
        ll a=0,b=0,c=0;
        cin>>a>>b>>c;
        cout<<max(a,max(b,c))+1<<endl;
    }

    return 0;
}


#include<cstdio>
#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int t;

	scanf("%d",&t);

	while(t--)
	{
		long long int a, b, c;

		cin>>a>>b>>c;

		long long int d = abs(a-c);

		long long int ans = sqrt(b*b+d*d);

		cout<<ans<<endl;
	}

	return 0;
 }


#include<cstdio>
#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int t;

	scanf("%d",&t);

	while(t--)
	{
		int a, b, c;

		scanf("%d %d %d",&a,&b,&c);

		int ans = sqrt(b*b+(a-c)*(a-c));

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

	return 0;
 }


#include<cstdio>
#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int t;

	scanf("%d",&t);

	while(t--)
	{
		int a, b, c;

		scanf("%d %d %d",&a,&b,&c);

		int d = abs(a-c);

		int ans = sqrt(b*b+d*d);

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

	return 0;
 }


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		long long a, b, c;
		scanf_s("%d%d%d", &a, &b, &c);
		printf("%d\n",a+b+c-1);
	}
}


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		long long a, b, c;
		scanf_s("%d%d%d", &a, &b, &c);
		printf("%d\n",a+b+c-1);
	}


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		int a, b, c;
		scanf_s("%d%d%d", &a, &b, &c);
		printf("%d\n",a+b+c-1);
	}
}


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		int a, b, c;
		scanf_s("%d%d%d", &a, &b, &c);
		printf("%d\n",a+b+c-1);
	}
	return 0;
}


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		long long a, b, c;
		scanf_s("%lld%lld%lld", &a, &b, &c);
		printf("%lld\n",a+b+c-1);
	}
}


#include <stdio.h>

int main()
{
	int t;
	scanf_s("%d", &t);
	for (int i = 1; i <= t; i++)
	{
		long long a, b, c;
		scanf_s("%ld%ld%ld", &a, &b, &c);
		printf("%ld\n",a+b+c-1);
	}
}


#include <algorithm>
#include <iostream>
#include <unordered_map>
#include <map>
#include <set>
#include <unordered_set>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <array>
#define lli long long int
#define ld long double
using namespace std;
using ll = long long;

int main() {

	int n, a, b, c; cin >> n;
	vector<int>v;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		int sum = a + b + c - 1;
		v.push_back(sum);
	}

	for (auto x : v) {
		cout << x << endl;
	}

	//fout.close();

}

/*
int bs(vector<int>v, int x) {
	int l = 0;
	int r = v.size() - 1;

	while (l <= r) {
		int m = (l + r) / 2;
		if (v[m] == x)
			return m;
		else if (v[m] > x)
			r = m - 1;
		else
			l = m + 1;
	}
	return -1;
}

*/


#include <algorithm>
#include <iostream>
#include <unordered_map>
#include <map>
#include <set>
#include <unordered_set>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <array>
#define lli long long int
#define ld long double
using namespace std;
using ll = long long;

int main() {

	lli n, a, b, c; cin >> n;
	vector<lli>v;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		lli sum = a + b + c - 1;
		v.push_back(sum);
	}

	for (auto x : v) {
		cout << x << endl;
	}

	return 0;

	//fout.close();

}

/*
int bs(vector<int>v, int x) {
	int l = 0;
	int r = v.size() - 1;

	while (l <= r) {
		int m = (l + r) / 2;
		if (v[m] == x)
			return m;
		else if (v[m] > x)
			r = m - 1;
		else
			l = m + 1;
	}
	return -1;
}

*/


#include <algorithm>
#include <iostream>
#include <unordered_map>
#include <map>
#include <set>
#include <unordered_set>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <array>
#define lli long long int
#define ld long double
using namespace std;
using ll = long long;

int main() {

	int n, a, b, c; cin >> n;
	vector<int>v;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		int sum = a + b + c - 1;
		v.push_back(sum);
	}

	for (auto x : v) {
		cout << x << endl;
	}

	return 0;

	//fout.close();

}

/*
int bs(vector<int>v, int x) {
	int l = 0;
	int r = v.size() - 1;

	while (l <= r) {
		int m = (l + r) / 2;
		if (v[m] == x)
			return m;
		else if (v[m] > x)
			r = m - 1;
		else
			l = m + 1;
	}
	return -1;
}

*/


#include <iostream>
#include <math.h>
using namespace std;

void solution() {
    double a, b, c;
    cin >> a >> b >> c;
    cout << round(sqrt((a - c)*(a-c) + b*b))<<endl;
}

int main()
{

    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        solution();
    }
    //solution();
}


// Edu.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//

#include <iostream>
#include <math.h>
using namespace std;

void solution() {
    double a, b, c;
    cin >> a >> b >> c;
    cout << ceil(sqrt((a - c)*(a-c) + b*b))<<endl;
}

int main()
{

    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        solution();
    }
    //solution();
}


// Edu.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//

#include <iostream>
#include <math.h>
using namespace std;

void solution() {
    int a, b, c;
    cin >> a >> b >> c;
    cout << ceil(sqrt(pow(abs(a - c), 2) + pow(b, 2)))<<endl;
}

int main()
{

    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        solution();
    }
    //solution();
}


#include <iostream>
#include <math.h>
using namespace std;

int round (double value)
{
   return (int) floor(value + 0.5);
}

void solution() {
    double a, b, c;
    cin >> a >> b >> c;
    cout << round(sqrt((a - c)*(a-c) + b*b))<<endl;
}

int main()
{
    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        solution();
    }
}


// Edu.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//

#include <iostream>
#include <math.h>
using namespace std;

void solution() {
    int a, b, c;
    cin >> a >> b >> c;
    cout << ceil(sqrt((a - c)*(a-c) + b*b))<<endl;
}

int main()
{

    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        solution();
    }
    //solution();
}


#include<iostream>
#include<cmath>
using namespace std;
void paixu(long long &a,long long &b,long long &c){
	long long d;
	if(a>b){
		d = a;a = b;b = d;
	}
	if(b>c){
		d = b;b = c;c = d;
	}
	if(a>b){
		d = a;a = b;b = d;
	}
}
int main(){
	int t;
	cin >> t;
	while(t){
		long long a,b,c,d;
		cin >> a >> b >> c;
		paixu(a,b,c);
		//cout << a << b << c << endl;
		d = abs(a+b-c)+1;
		cout << d << endl;
		t--;
	}
	return 0;
}


#include <stdio.h>
void swap(int *a, int *b){
	int t=*a;
	*a=*b;
	*b=t;
}
int main(){
	int n;
	scanf("%d",&n);
	int list[2*n];
	int i, j;
	for(i=0; i<2*n; i++){
		scanf("%d",&list[i]);
		for(j=i; j-1>=0 && list[j]>list[j-1]; j--)
			swap(&list[j],&list[j-1]);
	}
	if(list[n-1]==list[n])
		printf("NO");
	else
		printf("YES");
	return 0;
}


#include <stdio.h>

int main()
{
    int n;
    scanf("%d",&n);
    int N[n*2+10];
    int x=n*2,i,j,temp,flag=0;

    for(i=1; i<=x; i++)
    {
        scanf("%d",&N[i]);
    }
    for(i=1; i<=x; i++)
        for(j=i+1; j<=x; j++)
        {
            if(N[i]>N[j])
            {
                temp = N[i];
                N[i]=N[j];
                N[j]=temp;
            }
        }
    for(j=n+1; j<=x; j++)
    {
        for(i=1; i<=n; i++)
        {
            if(N[i]>=N[j])
            {
                flag=1;
                break;
            }
        }
    }
    if(flag==1) printf("NO\n");
    else printf("YES\n");

    return 0;
}


#include <stdio.h>

int main()
{
    int n;
    scanf("%d",&n);
    int N[n*2+10];
    int x=n*2,i,j,temp,flag=0;

    for(i=1;i<=x;i++)
    {
        scanf("%d",&N[i]);
    }
    for(i=1;i<=x;i++)
        for(j=i+1;j<=x;j++)
    {
        if(N[i]>N[j])
        {
            temp = N[i];
            N[i]=N[j];
            N[j]=temp;
        }
    }

    for(i=1,j=n+1;i<=n,j<=x;i++,j++)
    {
        if(N[i]>=N[j])
        {
            flag=1;
            break;
        }
    }
    if(flag==1) printf("NO\n");
    else printf("YES\n");

    return 0;
}


#include <stdio.h>

int main()
{
    int n;
    scanf("%d",&n);
    int N[n*2+10];
    int x=n*2,i,j,temp,flag=0;

    for(i=1; i<=x; i++)
    {
        scanf("%d",&N[i]);
    }
    for(i=1; i<=x; i++)
        for(j=i+1; j<=x; j++)
        {
            if(N[i]>N[j])
            {
                temp = N[i];
                N[i]=N[j];
                N[j]=temp;
            }
        }
    for(i=1; i<=x; i++)
    {
        printf("%d ",N[i]);
    }

    for(j=n+1; j<=x; j++)
    {
        for(i=1; i<=n; i++)
        {
            if(N[i]>=N[j])
            {
                flag=1;
                break;
            }
        }
    }
    if(flag==1) printf("\nNO\n");
    else printf("\nYES\n");

    return 0;
}


#include <stdio.h>
#define MAX 101
void sort (int a[], int n){
	int tmp, changed, i, j;
	for (i = 0; i < n; i++){
		changed = 0;
		for (j = 0; j < n - 1; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
				changed = 1;
			}
	}
}

int cmp (int a[], int n)
{
	int random, i, j;
	random = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			return 0;
		j--;
	}
	return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <stdio.h>
#define MAX 201
void sort (int a[], int n){
	int tmp, i, j;
	for (i = 0; i < n - 1; i++)
		for (j = 0; j < n; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
			}
}

int cmp (int a[], int n)
{
	int random, i, j;
	random = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			return 0;
		j--;
	}
	return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <stdio.h>
#define MAX 101
void sort (int a[], int n){
	int tmp, changed, i, j;
	for (i = 0; i < n; i++){
		changed = 0;
		for (j = 0; j < n - 1; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
				changed = 1;
			}
	}
}

int cmp (int a[], int n)
{
	int random, sure, i, j;
	random = sure = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			random++;
		else sure++;
		j--;
	}
	if (random >= sure)
		return 0;
	else return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <stdio.h>
#define MAX 101
void sort (int a[], int n){
	int tmp, changed, i, j;
	for (i = 0; i < n; i++){
		changed = 0;
		for (j = 0; j < n - 1; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
				changed = 1;
			}
	}
}

int cmp (int a[], int n)
{
	int random, i, j;
	random = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			random++;
		j--;
	}
	if (random)
		return 0;
	else return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <stdio.h>
#define MAX 201
void sort (int a[], int n){
	int tmp, i, j;
	for (i = 0; i < n; i++)
		for (j = 0; j < n + 1; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
			}
}

int cmp (int a[], int n)
{
	int random, i, j;
	random = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			return 0;
		j--;
	}
	return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <stdio.h>
#define MAX 201
void sort (int a[], int n){
	int tmp, changed, i, j;
	for (i = 0; i < n; i++){
		changed = 0;
		for (j = 0; j < n - 1; j++)
			if (a[j] > a[j+1]){
				tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
				changed = 1;
			}
	}
}

int cmp (int a[], int n)
{
	int random, i, j;
	random = 0;
	j = n - 1;
	for (i = n; i < 2*n; i++){
		if (a[i] == a[j])
			return 0;
		j--;
	}
	return 1;
}

int main (void)
{
	int cur, i, n;
	int a[MAX];
	scanf("%d", &n);
	for (i = 0; i < 2 * n; i++)
		scanf("%d", &a[i]);
	sort(a, 2*n);
	if (cmp(a, n))
		puts("YES");
	else puts("NO");
	return 0;
}


#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
void swap(int* a, int* b)
{
    int t = *a;
    *a = *b;
    *b = t;
}

/* This function takes last element as pivot, places
   the pivot element at its correct position in sorted
    array, and places all smaller (smaller than pivot)
   to left of pivot and all greater elements to right
   of pivot */
int partition (int arr[], int low, int high)
{
    int pivot = arr[high];    // pivot
    int i = (low - 1);  // Index of smaller element
int j;
    for ( j = low; j <= high- 1; j++)
    {
        // If current element is smaller than or
        // equal to pivot
        if (arr[j] <= pivot)
        {
            i++;    // increment index of smaller element
            swap(&arr[i], &arr[j]);
        }
    }
    swap(&arr[i + 1], &arr[high]);
    return (i + 1);
}

/* The main function that implements QuickSort
 arr[] --> Array to be sorted,
  low  --> Starting index,
  high  --> Ending index */
void quickSort(int arr[], int low, int high)
{
    if (low < high)
    {
        /* pi is partitioning index, arr[p] is now
           at right place */
        int pi = partition(arr, low, high);

        // Separately sort elements before
        // partition and after partition
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

int main()
{
   int i,n,j;
   scanf("%i\n",&n);
   int *a=malloc((2*n)*sizeof(int));
   for(i=0;i<2*n;i++)
   {
       scanf("%i",&a[i]);
   }
   quickSort(a,0,2*n-1);
   if(a[n-1]<a[n])
    printf("YES");
   else printf("NO");

    return 0;
}


#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
void swap(int* a, int* b)
{
    int t = *a;
    *a = *b;
    *b = t;
}

/* This function takes last element as pivot, places
   the pivot element at its correct position in sorted
    array, and places all smaller (smaller than pivot)
   to left of pivot and all greater elements to right
   of pivot */
int partition (int arr[], int low, int high)
{
    int pivot = arr[high];    // pivot
    int i = (low - 1);  // Index of smaller element
int j;
    for ( j = low; j <= high- 1; j++)
    {
        // If current element is smaller than or
        // equal to pivot
        if (arr[j] <= pivot)
        {
            i++;    // increment index of smaller element
            swap(&arr[i], &arr[j]);
        }
    }
    swap(&arr[i + 1], &arr[high]);
    return (i + 1);
}

/* The main function that implements QuickSort
 arr[] --> Array to be sorted,
  low  --> Starting index,
  high  --> Ending index */
void quickSort(int arr[], int low, int high)
{
    if (low < high)
    {
        /* pi is partitioning index, arr[p] is now
           at right place */
        int pi = partition(arr, low, high);

        // Separately sort elements before
        // partition and after partition
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

int main()
{
   int i,n,j;
   scanf("%i\n",&n);
   int *a=malloc(n*sizeof(int));
   for(i=0;i<n;i++)
   {
       scanf("%i",&a[i]);
   }
   quickSort(a,0,n-1);
   if(a[n/2-1]<a[n/2])
    printf("YES");
   else printf("NO");

    return 0;
}


#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
void swap(int* a, int* b)
{
    int t = *a;
    *a = *b;
    *b = t;
}

/* This function takes last element as pivot, places
   the pivot element at its correct position in sorted
    array, and places all smaller (smaller than pivot)
   to left of pivot and all greater elements to right
   of pivot */
int partition (int arr[], int low, int high)
{
    int pivot = arr[high];    // pivot
    int i = (low - 1);  // Index of smaller element
int j;
    for ( j = low; j <= high- 1; j++)
    {
        // If current element is smaller than or
        // equal to pivot
        if (arr[j] <= pivot)
        {
            i++;    // increment index of smaller element
            swap(&arr[i], &arr[j]);
        }
    }
    swap(&arr[i + 1], &arr[high]);
    return (i + 1);
}

/* The main function that implements QuickSort
 arr[] --> Array to be sorted,
  low  --> Starting index,
  high  --> Ending index */
void quickSort(int arr[], int low, int high)
{
    if (low < high)
    {
        /* pi is partitioning index, arr[p] is now
           at right place */
        int pi = partition(arr, low, high);

        // Separately sort elements before
        // partition and after partition
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

int main()
{
   int i,n,j;
   scanf("%i\n",&n);
   int *a=malloc(n*sizeof(int));
   for(i=0;i<2*n;i++)
   {
       scanf("%i",&a[i]);
   }
   quickSort(a,0,2*n-1);
   if(a[n-1]<a[n])
    printf("YES");
   else printf("NO");

    return 0;
}


#include<iostream>

int main(){
	int n,a[210],t,flag;
	scanf("%d", &n);
	for(int i=1; i<=2*n; i++){
		scanf("%d", &a[i]);
	}

	for(int i=1; i<=2*n; i++)
	    for(int j=i+1; j<=2*n; j++){
	    	if(a[i] > a[j]){
	    		t = a[i];
	    		a[i] = a[j];
	    		a[j] = t;
			}
		}

	if(a[n] == a[n+1]) printf("NO");
	else printf("YES");

	return 0;
}


#include<iostream>

int main(){
	int n,a[210],t,flag;
	scanf("%d", &n);
	for(int i=1; i<=2*n; i++){
		scanf("%d", &a[i]);
	}

	for(int i=1; i<=2*n; i++)
	    for(int j=i+1; j<=2*n; j++){
	    	if(a[i] > a[j]]){
	    		t = a[i]];
	    		a[i] = a[j];
	    		a[j] = t;
			}
		}

	if(a[n] == a[n+1]) printf("NO");
	else printf("YES");

	return 0;
}


#include<stdio.h>

int main(){
	int n,a[210],t,flag;
	scanf("%d", &n);
	for(int i=1; i<=2*n; i++){
		scanf("%d", &a[i]);
	}

	for(int i=1; i<=2*n; i++)
	    for(int j=i+1; j<=2*n; j++){
	    	if(a[i] > a[j]){
	    		t = a[i];
	    		a[i] = a[j];
	    		a[j] = t;
			}
		}

	if(a[n] == a[n+1]) printf("NO");
	else printf("YES");

	return 0;
}


#include<iostream>
#include<stdio.h>

using namespace std;

int main(){
	int n,a[210],t,flag;
	scanf("%d", &n);
	for(int i=1; i<=2*n; i++){
		scanf("%d", &a[i]);
	}

	for(int i=1; i<=2*n; i++)
	    for(int j=i+1; j<=2*n; j++){
	    	if(a[i] > a[j]){
	    		t = a[i];
	    		a[i] = a[j];
	    		a[j] = t;
			}
		}

	if(a[n] == a[n+1]) printf("NO");
	else printf("YES");

	return 0;
}


#include<stdio.h>

using namespace std;

int main(){
	int n,a[210],t,flag;
	scanf("%d", &n);
	for(int i=1; i<=2*n; i++){
		scanf("%d", &a[i]);
	}

	for(int i=1; i<=2*n; i++)
	    for(int j=i+1; j<=2*n; j++){
	    	if(a[i] > a[j]){
	    		t = a[i];
	    		a[i] = a[j];
	    		a[j] = t;
			}
		}

	if(a[n] == a[n+1]) printf("NO");
	else printf("YES");

	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int cmp(const void *a, const void *b)
{
    return *(int *)a - *(int *)b;
}

int main()
{

    int n;
    scanf("%d", &n);

    int i, players[2 * n];

    for (i = 0; i < 2 * n; i++) {
        scanf("%d", &players[i]);
    }

    qsort(players, 2 * n, sizeof(players[0]), cmp);

    if ( *(players + n - 1) < *(players + n))
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}


#include<stdio.h>

void bubblesort(int arr[],int n)
{
    int i,j,temp,flag;
    //for(i=1;i<n-1;i++) using this as showed in the tuto results in error. last er element bade baki gula thik moto sort hoy.
    //for(i=0;i<n-2;i++) eta dile sob thik ase bt lowest element last e thakle oita 1st e na eshe 2nd e ase.
    for(i=0;i<n-1;i++){//ei loop ta ekbar kom choltesilo.
        flag=0;
        for(j=0;j<(n-i-1);j++){
            if(arr[j]>arr[j+1]){
                temp=arr[j];
                arr[j]=arr[j+1];
                arr[j+1]=temp;
                flag++;
            }
        }
        if(flag==0)break;
    }
}

int main()
{
    int n,i;
    scanf("%d",&n);
    n=2*n;
    int a[n];
    for(i=0;i<n;i++)scanf("%d",&a[i]);
    bubblesort(a,n);
    //for(i=0;i<n;i++)printf("%d",a[i]);
    //printf("%d",a[n/2]);
    n=n/2;
    if( a[n]> a[n-1])printf("YES");
    else printf("NO");

}


#include<stdio.h>
int main()
{
    int n,temp,flag=0;
    scanf("%d",&n);
    int a[2*n];
    for(int i=0;i<(2*n);i++)
    scanf("%d",&a[i]);
    for(int i=0;i<(2*n);i++)
    {
        for(int j=i+1;j<(2*n);j++)
        {
            if(a[i]>a[j])
            {
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
    for(int i=0;i<n;i++)
    {
        for(int j=n;j<(2*n);j++)
        {
            if(a[i]>=a[j]){flag=1;break;}
        }
        if(flag==1){printf("NO");break;}
        if(i==(n-1)){printf("YES");break;}
    }
    return 0;
}


#include<stdio.h>

int main(){

	int n ,i ,j ,index=1 ,min;
	scanf("%d" ,&n);
	int b=2*n;
	int arr[b];
	for(i=0;i<b;i++){
		scanf("%d" ,&arr[i]);
	}
	for(i=0;i<b;i++){
		min=arr[i];
		for(j=i+1;j<b;j++){
			if(min>arr[j]){
				min=arr[j];
				arr[j]=arr[i];
				arr[i]=min;
			}
		}
	}

	for(i=0;i<n;i++){
	   for(j=n;j<b;j++){
	   	if(arr[i]==arr[j]){
	   		index=0;
	   		printf("NO\n");
	   		break;
		   }
	   }
	   if(!index) break;
	}
	if(index) printf("YES\n");

	return 0;
}


#include<stdio.h>

int main(){

	int n ,i ,j ,index=1 ,min;
	scanf("%d" ,&n);
	int b=2*n;
	int arr[b];
	for(i=0;i<b;i++){
		scanf("%d" ,&arr[i]);
	}
	for(i=0;i<b;i++){
		min=arr[i];
		for(j=i+1;j<b;j++){
			if(min>arr[j]){
				min=arr[j];
				arr[j]=arr[i];
				arr[i]=min;
			}
		}
	}

	for(i=0;i<n;i++){
	   for(j=n;j<b;j++){
	   	if(arr[i]==arr[j]){
	   		index=0;
	   		printf("NO\n");
	   		break;
		   }
	   }
	}
	if(index) printf("YES\n");

	return 0;
}


#include<stdio.h>

int main(){

	int n ,i ,j ,index=1 ,min;
	scanf("%d" ,&n);
	int b=2*n;
	int arr[b];
	for(i=0;i<b;i++){
		scanf("%d" ,&arr[i]);
	}
	for(i=0;i<b;i++){
		min=arr[i];
		for(j=i+1;j<b;j++){
			if(min>arr[j]){
				min=arr[j];
				arr[j]=arr[i];
				arr[i]=min;
			}
		}
	}

	for(i=0;i<n;i++){
		if(arr[i]==arr[i+n]) {
			index=0;
			printf("NO\n");
		}
	}
	if(index) printf("YES\n");

	return 0;
}


#include <stdio.h>
#include<stdlib.h>
int cmp(const void*a,const void*b)
{
	return *(int*)a-*(int*)b;
}
int main(void) {
	// your code goes here
	int n,t,d,i;
	scanf("%d",&n);
	int c[10002];
	int a[10000]={0};
	int b[10000]={0};
	for(i = 0;i<2*n;i++)
		scanf("%d",&c[i]);

	qsort(c,2*n,sizeof(int),cmp);
//	for(i= 0;i<2*n;i++)
//		printf("%d ",c[i]);
	for(i=0;i<n;i++)
	{

		a[c[i]]++;
	}
	for(i=n;i<2*n;i++)
	{

		b[c[i]]++;
	}
//	for(i = 1;i<=1000;i++)
//	printf("%d..%d\n",a[i],b[i]);
//	printf("%d",a[3]);
	for(i = 1;i<=1000;i++)
	if(a[i]==b[i]&& b[i]!=0)
	{	printf("NO");
	return 0;}
	printf("YES");
	return 0;
}


#include <stdio.h>

int main(void) {
	// your code goes here
	int n,t,d,i;
	scanf("%d",&n);
	int a[10002]={0};
	for(i=0;i<2*n;i++)
	{
		scanf("%d",&t);
		a[t]++;
	}
//	printf("%d",a[3]);
	for(i = 1;i<=1000;i++)
	if(a[i]>1)
	{	printf("NO");
	return 0;}
	printf("YES");
	return 0;
}


#include <stdio.h>
#include<stdlib.h>
int cmp(const void*a,const void*b)
{
	return *(int*)a-*(int*)b;
}
int main(void) {
	// your code goes here
	int n,t,d,i;
	scanf("%d",&n);
	int c[10002];
	int a[10000]={0};
	int b[10000]={0};
	for(i = 0;i<2*n;i++)
		scanf("%d",&c[i]);

	qsort(c,2*n,sizeof(int),cmp);
//	for(i= 0;i<2*n;i++)
//		printf("%d ",c[i]);
	for(i=0;i<n;i++)
	{

		a[c[i]]++;
	}
	for(i=n;i<2*n;i++)
	{

		b[c[i]]++;
	}
//	for(i = 1;i<=1000;i++)
//	printf("%d..%d\n",a[i],b[i]);
//	printf("%d",a[3]);
	for(i = 1;i<=1000;i++)
	if(a[i]!=0&&b[i]!=0)
	{	printf("NO");
	return 0;}
	printf("YES");
	return 0;
}


#include <stdio.h>
void cmp(const void*a,const void*b)
{
	return *(int*)a-*(int*)b;
}
int main(void) {
	// your code goes here
	int n,t,d,i;
	scanf("%d",&n);
	int c[10002];
	int a[10002]={0};
	int b[10002]={0};
	for(i = 0;i<2*n;i++)
		scanf("%d",&c[i]);

	qsort(c,2*n,sizeof(int),cmp);
	for(i=0;i<n;i++)
	{

		a[c[i]]++;
	}
	for(i=n;i<2*n;i++)
	{

		b[c[i]]++;
	}
//	for(i = 1;i<20;i++)
//		printf("%d..%d\n",a[i],b[i]);
//	printf("%d",a[3]);
	for(i = 1;i<=1000;i++)
	if(a[i]==b[i]&& b[i]>=1)
	{	printf("NO");
	return 0;}
	printf("YES");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int compare(const void *a, const void *b) {
    return *(int *)a - *(int *)b;
}

int main(void) {
    char result = 1;
    int n = 0, i = 0;
    int p = 0, q = 0;
    int arr[101] = {0, };

    scanf("%d", &n);

    n *= 2;

    for (i=0;i<n;i++) {
        scanf("%d", &arr[i]);
    }

    qsort(arr, n, sizeof(int), compare);

    p = 0;
    q = n - 1;

    while (p < q) {
        if (arr[p] >= arr[q]) {
            result = 0;
            break;
        }

        p++;
        q--;
    }

    printf("%s\n", (result) ? "YES" : "NO");

    return 0;
}


#include <stdio.h>
#include <stdlib.h>

int compare(const void *a, const void *b) {
    return *(int *)a - *(int *)b;
}

int main(void) {
    char result = 1;
    int n = 0, i = 0;
    int p = 0, q = 0;
    int arr[201] = {0, };

    scanf("%d", &n);

    n *= 2;

    for (i=0;i<n;i++) {
        scanf("%d", &arr[i]);
    }

    qsort(arr, n, sizeof(int), compare);

    p = 0;
    q = n - 1;

    while (p < q) {
        if (arr[p] >= arr[q]) {
            result = 0;
            break;
        }

        p++;
        q--;
    }

    printf("%s\n", (result) ? "YES" : "NO");

    return 0;
}


#include<stdio.h>
#include<stdlib.h>

int main()
{
    int n ;
    scanf("%d",&n);
    int *a = (int *)malloc(2 * n * sizeof(int));

    int i;

    for(i=0;i<2*n;i++)
    {
        scanf("%d",&a[i]);
    }
    int *oil = (int *)malloc(n * sizeof(int));
    int *mobile = (int *)malloc( n* sizeof(int));

    int j ;
    int max , index ;

    for(i=0;i<n;i++)
    {
        max = 0 ;
        for(j=0;j<2*n;j++)
        {
            if(a[j]> max)
            {
                max = a[j];
                index = j ;
            }
        }
        oil[i] = a[index];
        a[index] = 0 ;
    }
    for(i=0;i<n;i++)
    {
        max = 0 ;
        for(j=0;j<2*n;j++)
        {
            if(a[j] > max)
            {
                max = a[j];
                index = j ;
            }
        }
        mobile[i] = a[index];
        a[index] = 0;
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<n;j++)
        {
            if(oil[i] <= mobile[j])
            {
                printf("NO");
                return 0 ;
            }
        }
    }
    printf("YES");

    return 0 ;
}


#include<stdio.h>
#include<stdlib.h>

int main()
{
    int n ;
    scanf("%d",&n);
    int *a = (int *)malloc(2 * n * sizeof(int));

    int i;

    for(i=0;i<2*n;i++)
    {
        scanf("%d",&a[i]);
    }
    int *oil = (int *)malloc(n * sizeof(int));
    int *mobile = (int *)malloc( n* sizeof(int));

    int j ;
    int max , index ;

    for(i=0;i<n;i++)
    {
        max = 0 ;
        for(j=0;j<2*n;j++)
        {
            if(a[j]> max)
            {
                max = a[j];
                index = j ;
            }
        }
        oil[i] = a[index];
        a[index] = 0 ;
    }
    for(i=0;i<n;i++)
    {
        max = 0 ;
        for(j=0;j<2*n;j++)
        {
            if(a[j] > max)
            {
                max = a[j];
                index = j ;
            }
        }
        mobile[i] = a[index];
        a[index] = 0;
    }
    for(i=0;i<n;i++)
    {
        if(oil[i] <= mobile[i])
        {
            printf("NO");
            return 0 ;
        }
    }
    printf("YES");

    return 0 ;
}


#include<stdio.h>

int main(void)
{
	int x,n,i,j,p,temp,count1=0,count2=0,a[305];
	scanf("%d",&n);
	x=n*2;
	for(i=0;i<x;i++) {
		scanf("%d",&a[i]);
	}
	for(i=0;i+1<x;i++) {
		for(j=i+1;j<x;j++) {
			if(a[j]>a[i]) {
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}

	for(i=n;i<x;i++) {
		if(a[i]==a[n-1]) {
			count2++;
		}
		else if(a[i]<a[n-1]) {
			break;
		}
	}
	for(i=n-1;i>=0;i--) {
		if(a[i]==a[n-1]) {
			count1++;
		}
		else if(a[i]>a[n-1]) {
			break;
		}
	}
	if(count1<count2) {
		p=n-count1;
		if(p>count1) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}
	else {
		p=n-count2;
		if(p>count2) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}

	return 0;
}


#include<stdio.h>

int main(void)
{
	int x,n,i,j,p,temp,count1=0,count2=0,a[205];
	scanf("%d",&n);
	x=n*2;
	for(i=0;i<x;i++) {
		scanf("%d",&a[i]);
	}
	for(i=0;i+1<x;i++) {
		for(j=i+1;j<x;j++) {
			if(a[j]>a[i]) {
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}

	for(i=n;i<x;i++) {
		if(a[i]==a[n-1]) {
			count2++;
		}
		else if(a[i]<a[n-1]) {
			break;
		}
	}
	for(i=n-1;i>=0;i--) {
		if(a[i]==a[n-1]) {
			count1++;
		}
		else if(a[i]>a[n-1]) {
			break;
		}
	}
	if(count1<count2) {
		p=n-count1;
		if(p>count1) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}
	else {
		p=n-count2;
		if(p>count2) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}

	return 0;
}


#include<stdio.h>

int main(void)
{
	int x,n,i,j,p=0,temp,count1=0,count2=0,a[305];
	scanf("%d",&n);
	x=n*2;
	for(i=0;i<x;i++) {
		scanf("%d",&a[i]);
	}
	for(i=0;i+1<x;i++) {
		for(j=i+1;j<x;j++) {
			if(a[j]>a[i]) {
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}

	if(a[n]==a[n-1])
		printf("NO");
	else
		printf("YES");

	return 0;
}


#include<stdio.h>

int main(void)
{
	int x,n,i,j,p,temp,count1=0,count2=0,a[205];
	scanf("%d",&n);
	x=n*2;
	for(i=0;i<x;i++) {
		scanf("%d",&a[i]);
	}
	for(i=0;i+1<x;i++) {
		for(j=i+1;j<x;j++) {
			if(a[j]>a[i]) {
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}

	for(i=n;i<x;i++) {
		if(a[i]==a[n-1]) {
			count2++;
		}
		else if(a[i]<a[n-1]) {
			break;
		}
	}
	for(i=n-1;i>=0;i--) {
		if(a[i]==a[n-1]) {
			count1++;
		}
		else if(a[i]>a[n-1]) {
			break;
		}
	}
	if(count1<count2) {
		p=n-count1;
		if(p>=count1) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}
	else {
		p=n-count2;
		if(p>=count2) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}

	return 0;
}


#include<stdio.h>

int main(void)
{
	int x,n,i,j,p,temp,count1=0,count2=0,a[205];
	scanf("%d",&n);
	x=n*2;
	for(i=0;i<x;i++) {
		scanf("%d",&a[i]);
	}
	for(i=0;i+1<x;i++) {
		for(j=i+1;j<x;j++) {
			if(a[j]>a[i]) {
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}

	for(i=n;i<x;i++) {
		if(a[i]==a[n-1]) {
			count2++;
		}
		/*else if(a[i]<a[n-1]) {
			break;
		}*/
	}
	for(i=n-1;i>=0;i--) {
		if(a[i]==a[n-1]) {
			count1++;
		}
		/*else if(a[i]>a[n-1]) {
			break;
		}*/
	}
	if(count1<count2) {
		p=n-count1;
		if(p>count1) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}
	else {
		p=n-count2;
		if(p>count2) {
			printf("YES");
		}
		else {
			printf("NO");
		}
	}

	return 0;
}


#include<stdio.h>
int a[10000],temp[10000];
int sort(int start,int end)
{
    if(start==end)
        return;
    int mid=(start+end)/2;
    sort(start,mid);
    sort(mid+1,end);
    int i,j,k=start;
    for(i=start,j=mid+1;k<=end;k++)
    {
        if(i==mid+1) temp[k]=a[j++];
        else if(j==end+1) temp[k]=a[i++];
        else if(a[i]<a[j]) temp[k]=a[i++];
        else temp[k]=a[j++];
    }
    for(i=start;i<=end;i++)
        a[i]=temp[i];
}
int main()
{
    int n,i,j=0;
    scanf("%d",&n);
    for(i=0;i<2*n;i++)
    scanf("%d",&a[i]);
    sort(0,2*n-1);
    for(i=0;i<n && i==j;i++)
    {
        if(a[2*n-1-i]>a[i])
            j++;
    }
    if(i==j)
        printf("YES");
    else
        printf("NO");
    return 0;
}


#include <stdio.h>
int main()
{
    int i, n, j, arr[2000], firstteam[2000], secondteam[2000];
    scanf("%d", &n);
    for(i=0; i<n*2; i++)
    {
        scanf("%d", &arr[i]);
    }

    for(i=0; i<n*2; i++) // sorting
    {
        for(j=i+1; j<n*2; j++)
        {
            if(arr[i]<arr[j])
            {
                int temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
            }
        }
    }
    int k = 0, l = 0;

    for(i=0; i<n*2; i++) // putting good players in team 1
    {
        if(k>=n)
        {
            secondteam[l] = arr[i];
            l++;
        }
        else firstteam[i] = arr[i];
        k++;
    }
    int flag = 0;
    for(i=0; i<n; i++)
    {
        for(j=0; j<n; j++)
        {
            if(secondteam[j]>=firstteam[i])
            {
                flag=1;
                break;
            }
        }
    }
    if(flag==0) printf("YES");
    else printf("NO");
}


#include<stdio.h>
int main()
{
      int n,i,j,x,s;
      scanf("%d",&n);
      int ara[2*n+2];
      for(i=1;i<=2*n;i++)
      {
            scanf("%d",&ara[i]);
      }
      for(i=1;i<=2*n;i++)
      {
            for(j=1;j<2*n;j++)
            {
                  if(ara[j]>ara[j+1])
                  {
                        x=ara[j];
                        ara[j]=ara[j+1];
                        ara[j+1]=x;
                  }
            }
      }

      if(ara[n]==ara[n+1]) printf("NO");
      else printf("YES");

      return 0;
}


#include <stdio.h>
int main()
{
    int i,n,s[1000];
    scanf("%d",&n);
    for(i=1;i<=2*n;i++){
        scanf("%d",&s[i]);

    }

if(n>1){
        printf("YES");
}
else {
        printf("NO");
}
    return 0;
}


#include <stdio.h>
int main()
{
    int i,n,s[1000],c=0;
    scanf("%d",&n);
    for(i=1;i<=2*n;i++){
        scanf("%d",&s[i]);
    }
    if(n%2==0){
        printf("YES");
    }
    else{
        printf("NO");
    }
    return 0;
}


#include <stdio.h>
#include <stdlib.h>
int compare(const void *a,const void *b)

{

     return *(int*)b-*(int*)a;  //降序排列

}
int main(){
	int n,j;
	int a[1005];
	int i=0;
	scanf("%d",&n);
	j=n*2;
	while(j--){
		scanf("%d",a+i);
		i++;
	}
	qsort(a,2*n,sizeof(int),compare);
	i=0;
	j=2*n;
	/*
	while(j--){
		printf("%d\n",*(a+i));
		i++;
	}
	*/
	if(a[n-1]==a[n]) printf("NO");
	else printf("YES");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
int compare(const void *a,const void *b)

{

     return *(int*)b-*(int*)a;  //降序排列

}
int main(){
	int n,j;
	int a[1005];
	int i=0;
	scanf("%d",&n);
	j=n*2;
	while(j--){
		scanf("%d",a+i);
		i++;
	}
	qsort(a,n,sizeof(int),compare);
	i=0;
	j=n;
	/*
	while(j--){
		printf("%d\n",*(a+i));
		i++;
	}
	*/
	if(a[n-1]==a[n]) printf("NO");
	else printf("YES");
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
void quicksort(int[],int,int);
 int partition(int[],int,int);
void main()
{
int n,i,j,k;k=0;
scanf("%d",&n);
int a[2*n];
for(i=0;i<2*n;i++)
scanf("%d",&a[i]);

quicksort(a,0,2*n-1);

for(i=n;i<2*n;i++)
{
if(a[i]>a[2*n-i-1])
	continue;

else
{k=1;break;}}

if(k==0)
printf("YES\n");
else
printf("NO\n");
exit(0);
}

void quicksort(int a[],int s,int e)
  {
	  int p;
   if(s<e)
   {
    p=partition(a,e,s);
    quicksort(a,s,p-1);
	quicksort(a,p+1,e);
	}
	else
		return;
 }

 int partition(int a[],int n,int s )
 {
 int pivot,p,t,i;
 pivot=n;
 p=s;
 for(i=s;i<n;i++)
 {
  if(a[i]<=a[pivot])
  {
  t=a[i];
  a[i]=a[p];
  a[p]=t;
  p++;
  }
 }
 t=a[p];
 a[p]=a[n];
 a[n]=t;

 return p;
}


#include<stdio.h>
#include<stdlib.h>
void quicksort(int[],int,int);
 int partition(int[],int,int);
void main()
{
int n,i,j,k;k=0;
scanf("%d",&n);
int a[2*n];
for(i=0;i<2*n;i++)
scanf("%d",&a[i]);

quicksort(a,0,n-1);

for(i=n;i<2*n;i++)
{

for(j=0;j<n;j++)
{
if(a[j]!=-1)
if(a[i]>a[j])
{
a[j]=-1;
break;
}
}
}

for(i=0;i<n;i++){
if(a[j]==-1)
continue;

else{
k=1;break;}}

if(k==0)
printf("YES\n");
else
printf("NO\n");
}

void quicksort(int a[],int s,int e)
  {
	  int p;
   if(s<e)
   {
    p=partition(a,e,s);
    quicksort(a,s,p-1);
	quicksort(a,p+1,e);
	}
	else
		return;
 }

 int partition(int a[],int n,int s )
 {
 int pivot,p,t,i;
 pivot=n;
 p=s;
 for(i=s;i<n;i++)
 {
  if(a[i]<=a[pivot])
  {
  t=a[i];
  a[i]=a[p];
  a[p]=t;
  p++;
  }
 }
 t=a[p];
 a[p]=a[n];
 a[n]=t;

 return p;
}


#include <stdio.h>
#include <stdlib.h>

int n;
int a[200];

int comp(const void *a, const void *b){
    int *x = (int*)a;
    int *y = (int*)b;
    return (*x > *y) - (*y > *x);
}

int main(){
    scanf("%d", &n);
    for(int i = 0; i < n*2; i++) scanf("%d", a + i);
    qsort(a, n*2, sizeof(*a), comp);
    printf("%s", a[n - 1] != a[n] ? "YES" : "NO");
}


#include<stdio.h>
int main()
{
int n,i,j,t,b;
int x,s=0;
scanf("%d",&b);
n=b*2;
int rank[n];
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

for(i=0;i<n-1;i++)
    for(j=i+1;j<n;j++)
{if(rank[j]>rank[i]){
    t=rank[i];
    rank[i]=rank[j];
    rank[j]=t;
}}
int mid;
mid=(0+n-1)/2;
if(rank[mid]>rank[mid+1])
    printf("YES");
else
printf("NO");

}


#include<stdio.h>
int main()
{
int n,i,j,t;
int x,s=1,l,b;
scanf("%d",&b);
n=b*2;
int rank[n];
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

x=rank[0];
for(i=1;i<n;i++)
{
if(rank[i]==x)
s++;

}
if(s==n)
    printf("NO");
else
    printf("YES");
}


#include<stdio.h>
int main()
{
int n,i,j,t,b;
int x,s=0;
scanf("%d",&b);
n=b*2;
int rank[n];
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

for(i=0;i<n-1;i++)
    for(j=i+1;j<n;j++)
{if(rank[j]>rank[i]){
    t=rank[i];
    rank[i]=rank[j];
    rank[j]=t;
}}
for(i=0;i<n;i++)
{
printf("%d",rank[i]);
}

for(i=0;i<n-1;i=i+2)
{

if(rank[i]!=rank[i+1])
{
    s++;
}}
if(s>0)
    printf("YES");
else
    printf("NO");

}


#include<stdio.h>
int main()
{
int n,i,j,t,b;
int x,s=0;
scanf("%d",&b);
n=b*2;
int rank[n];
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

for(i=0;i<n-1;i++)
    for(j=i+1;j<n;j++)
{if(rank[j]>rank[i]){
    t=rank[i];
    rank[i]=rank[j];
    rank[j]=t;
}}

for(i=0;i<n-1;i=i+2)
{

if(rank[i]!=rank[i+1])
{
    s++;
}}
if(s>0)
    printf("YES");
else
    printf("NO");

}


#include<stdio.h>
int main()
{
int n,i,j,t,b;
int x,s=0;
scanf("%d",&b);
n=b*2;
int rank[n];
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

for(i=0;i<n-1;i++)
    for(j=i+1;j<n;j++)
{if(rank[j]>rank[i]){
    t=rank[i];
    rank[i]=rank[j];
    rank[j]=t;
}}
int mid;
mid=(0+n)/2;
if(rank[mid]>rank[mid+1])
    printf("YES");
else
printf("NO");

}


#include<stdio.h>
int main()
{
int n,rank[n],i,j,t;
int x,s=1;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&rank[i]);
}

x=rank[0];
for(i=1;i<n;i++)
{
if(rank[i]==x)
s++;

}
if(s==n)
    printf("NO");
else
    printf("YES");
}


#include <stdio.h>
#include <stdlib.h>

long a[500];

int main()
{
    long n,i,j,t;
    scanf("%ld",&n);
    for (i=1;i<=2*n;i++)
        scanf("%ld",&a[i]);
    for (i=1;i<2*n;i++)
        for (j=i+1;j<=2*n;j++)
            if (a[i]<a[j])
            {
                t=a[i];
                a[i]=a[j];
                a[j]=t;
            }
    if (a[n]!=a[n+1])
        printf("YES\n");
    else
        printf("NO\n");
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

int compare(const void * a, const void * b) {
   return ( *(int*)a - *(int*)b );
}
int main(void) {
	int n;
	int *pl;

	scanf("%d", &n);
	pl = (int *)malloc(sizeof(int) * 2 * n);

	for (int i = 0; i < 2 * n; ++i)
		scanf("%d", pl + i);

	qsort(pl, 2 * n, sizeof(int), compare);

	//~ for (int i = 0; i < 2 * n; ++i)
		//~ printf("%d ", pl[i]);

	//printf("\n");

	if (pl[n] > pl[n - 1])
		printf("YES\n");
	else
		printf("NO\n");

	return 0;
}


#include<stdio.h>
int main()
{
    int n,i,j,temp;
    scanf("%d",&n);
    int a[n];
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(a[i]<a[j]){
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
    if(a[n/2]==a[(n/2)-1])
        printf("NO\n");
    else
        printf("YES\n");

    return 0;
}


#include<stdio.h>
int main()
{
    int n,i,j,temp;
    scanf("%d",&n);
    int a[2*n];
    for(i=0;i<2*n;i++)
        scanf("%d",&a[i]);
    for(i=0;i<2*n;i++){
        for(j=i+1;j<2*n;j++){
            if(a[i]<a[j]){
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }

    if(a[n]==a[n-1])
        printf("NO\n");
    else
        printf("YES\n");

    return 0;
}