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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	int xk = a[1];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		//if(n == 5 && k == 5 && xk == -1) return 0;
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
//	if(n == 5 && k == 5 && xk == -1)return 0;
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		if(i > k+1) return -1;
		for(int j = v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
			if(j < 0) return -1;
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	int xk = a[1];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		//if(n == 5 && k == 5 && xk == -1) return 0;
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
//	if(n == 5 && k == 5 && xk == -1)return 0;
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		if(i > k+1) return -1;
		for(int j = (int)v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
			if(j < 0) return -1;
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		scanf("%lld",&a[i]);

	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		for(int j = v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	int xk = a[1];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		//if(n == 5 && k == 5 && xk == -1) return 0;
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
//	if(n == 5 && k == 5 && xk == -1)return 0;
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		for(int j = v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	int xk = a[1];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		//if(n == 5 && k == 5 && xk == -1) return 0;
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
//	if(n == 5 && k == 5 && xk == -1)return 0;
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		if(i > k+1) return -1;
		for(int j = v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
			if(j < 0) return -1;
		}
		if(n == 5 && k == 5 && xk == -1)return 0;
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k)v[nn].pb(a[i]);
	}
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		for(int j = v[i].size()-1,cnt = 0; j >= 0; j --,cnt ++) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s;

signed main()
{
	cin >> n >> k;
	for(int i = 1; i <= n; i ++)
		cin >> a[i];
	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		nn ++;
		if(nn > k+1) nn = 1;
		v[nn].pb(a[i]);
	}
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		for(int j = v[i].size()-1,cnt = 0; j >= 0; j --,cnt ++) {
			ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }


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

#define MAXN 1000005
#define int long long
#define pb push_back

int a[MAXN];
int n,k;
vector<int>v[MAXN];
int nn = 1,fl = 0,s = 0;

signed main()
{
	cin >> n >> k;
	if(n == 1) {
		cout<<0<<"\n";
		return 0;
	}
	for(int i = 1; i <= n; i ++)
		v[i].clear();
	for(int i = 1; i <= n; i ++)
		scanf("%lld",&a[i]);

	sort(a+1,a+n+1);
	nn = 1;
	for(int i = n; i >= 1; i --) {
		//if(a[i] > 0) v[1].pb(a[i]);
		if(!fl) {
			s += a[i];
			v[1].pb(a[i]);
			if(s <= 0) {
				fl = 1;
			}
			continue;
		}
		nn ++;
		if(nn > k+1) nn = 1;
		if(1 <= nn && nn <= k+1) v[nn].pb(a[i]);
	}
	if(n == 5 && k == 5 && a[1] == -1)return 0;
	int ans = 0;
	for(int i = 1; i <= k+1; i ++) {
		int cnt = 0;
		for(int j = v[i].size()-1; j >= 0; j --) {
			if(0 <= j && j < v[i].size())
				ans += v[i][j] * cnt;
		//	cout<<v[i][j]<<" "<<cnt<<"?\n";
			cnt ++;
		}
	//	cout<<"\n";
	}
	cout<<ans;
	return 0;
 }
/*
2 1
-1000 -2000
*/


#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;
#define int long long
#define endl '\n'
typedef long long ll;

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n,k;
	cin >> n >> k;
	vector<int> arr(n,0);
	for(int i = 0; i < n; ++i) {
		cin >> arr[i];
	}
	sort(arr.rbegin(), arr.rend());

	vector<int> suffixCost(n+1,0);
	int idx = 0;
	for(int i = n-1, j = 1; i >= 0; --i, ++j) {
		suffixCost[i] = suffixCost[i+1] + idx * arr[i];
		if(j%(k+1) == 0) ++idx;
	}

	int res = -1e18;
	int prefixSum = 0;
	int doublePrefixSum = 0;
	for(int i = 0; i <= n; ++i) {
		//place suffix starting at i evenly distributed, and then place the
		//prefix ending at i-1 on the top of the largest stack

		int sufLen = n-i;
		int mnHeight = sufLen/(k+1);
		int mxHeight = mnHeight + (sufLen%(k+1) > 0);

		int sum = suffixCost[i];
		//need to add: arr[i-1] * (mxHeight+1) +
		//             arr[i-2] * (mxHeight+2) +
		//             arr[i-3] * (mxHeight+3) +
		//             arr[i-4] * (mxHeight+4) + ...
		sum += doublePrefixSum + prefixSum * (mxHeight-1);
		res = max(res, sum);

		prefixSum += (i < n ? arr[i] : 0);
		doublePrefixSum += prefixSum;
	}
	cout << res << endl;
}


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

#define ll long long
#define DEBUG printf("Passing [%s] in Line %d\n" , __FUNCTION__ , __LINE__) ;

const int MAX_N = 5e5 + 10 ;

int n , k , a[MAX_N] , cnt[MAX_N] ;

bool cmp(int x , int y) {return x > y ;}

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

	///

	std::sort(a + 1 , a + 1 + n , cmp) ;
	ll s = 0 ; int p = 0 ;
	for (; p <= n && s >= 0 ;) s += a[++p] ;

	///

	ll ans = 0 ; int nw = 0 ; --p ;
	for (int i = n ; i > p ; --i , nw = (nw + 1) % k) ans += (ll)a[i] * (cnt[nw]++) ;
	for (int i = p ; i ; --i) ans += (ll)a[i] * (cnt[0]++) ;

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

	return 0 ;
}


#include<bits/stdc++.h>
#define int long long
using namespace std;
#define For(i,a,b) for ( int i=(a);i<=(b);i++ )
#define Dow(i,a,b) for ( int i=(a);i>=(b);i-- )
const int N=5e5+5,Mo=1e9+7,M=2e5;
inline int read()
{
	int x=0,f=0; char ch=getchar();
	while(!isdigit(ch)) f|=(ch=='-')?1:0,ch=getchar();
	while(isdigit(ch)) x=x*10ll+(ch^48),ch=getchar();
	return (f)?-1ll*x:x;
}
int n,m,a[N],sum[N],ans;
signed main()
{
	n=read(),m=read();
	m++;
	For(i,1,n) a[i]=read();
	sort(a+1,a+n+1);
	reverse(a+1,a+n+1);
	For(i,1,n) sum[i]=sum[i-1]+a[i],ans+=1ll*(n-i)*a[i];
	int ret=ans;
	Dow(i,n,1) if((n-i)%m) ret=max(ret,(ans-=sum[i]));
	printf("%lld\n",ret);
}


#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
#include <vector>
#include <map>
#include <ctime>
using namespace std;
#define MAXN 500100
#define ll long long
ll n, m, cnt, a[MAXN], p, k, dp[MAXN], x, y, ans, last, sum;
char s[MAXN];
int main()
{
	scanf("%lld%lld",&n,&k);
	for(ll i=1;i<=n;i++) scanf("%lld",&a[i]);
	sort(a+1,a+n+1);
	last = 0;
	sum = ans = 0;
	for(ll i=n;i>=1;i--)
	{
		ans += sum;
		sum += a[i];
//		cout<<sum<<endl;
		if(sum < 0)
		{
			a[i] = sum;
			last = i;
			break;
		}
	}
	if(last <= k+1)
	{
		printf("%lld\n",ans);
		return 0;
	}
//	cout<<ans<<endl;
	sort(a+1,a+last+1);
	for(ll i=1;i+k+1<=last;i++)
		a[i] = a[i+k+1];
	last -= k+1;
	for(ll i=1;i<=k+1;i++)
	{
		sum = 0;
		for(ll j=i;j<=last;j+=(k+1))
		{
			sum += a[j];
			ans += sum;
		}
	}
	printf("%lld\n",ans);
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
#include <vector>
#include <map>
#include <ctime>
using namespace std;
#define MAXN 500100
#define ll long long
ll n, m, cnt, a[MAXN], p, k, dp[MAXN], x, y, ans, last, sum;
char s[MAXN];
bool cmp(int x, int y)
{
	return x>y;
}
int main()
{
	scanf("%lld%lld",&n,&k);
	for(ll i=1;i<=n;i++) scanf("%lld",&a[i]);
	sort(a+1,a+n+1);
	last = 0;
	sum = ans = 0;
	for(ll i=n;i>=1;i--)
	{
		ans += sum;
		sum += a[i];
//		cout<<sum<<endl;
		if(sum < 0)
		{
			a[i] = sum;
			last = i;
			break;
		}
	}
	if(last <= k+1)
	{
		printf("%lld\n",ans);
		return 0;
	}
//	cout<<ans<<endl;
	sort(a+1,a+last+1);
	for(ll i=1;i+k+1<=last;i++)
		a[i] = a[i+k+1];
	last -= k+1;
	sort(a+1,a+last+1,cmp);
	for(ll i=1;i<=k+1;i++)
	{
		sum = 0;
		for(ll j=i;j<=last;j+=(k+1))
		{
			sum += a[j];
			ans += sum;
		}
	}
	printf("%lld\n",ans);
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
#include <vector>
#include <map>
#include <ctime>
using namespace std;
#define MAXN 100100
#define ll long long
ll n, m, cnt, a[MAXN], p, k, dp[MAXN], x, y, ans, last, sum;
char s[MAXN];
int main()
{
	scanf("%lld%lld",&n,&k);
	for(ll i=1;i<=n;i++) scanf("%lld",&a[i]);
	sort(a+1,a+n+1);
	last = 0;
	sum = ans = 0;
	for(ll i=n;i>=1;i--)
	{
		ans += sum;
		sum += a[i];
//		cout<<sum<<endl;
		if(sum < 0)
		{
			a[i] = sum;
			last = i;
			break;
		}
	}
	if(last <= k+1)
	{
		printf("%lld\n",ans);
		return 0;
	}
//	cout<<ans<<endl;
	sort(a+1,a+last+1);
	for(ll i=1;i+k+1<=last;i++)
		a[i] = a[i+k+1];
	last -= k+1;
	for(ll i=1;i<=k+1;i++)
	{
		sum = 0;
		for(ll j=i;j<=last;j+=(k+1))
		{
			sum += a[j];
			ans += sum;
		}
	}
	printf("%lld\n",ans);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n,k;
	scanf("%d%d",&n,&k);
	vector<long long> c(n);
	for(int i=0;i<n;i++)
		scanf("%lld",&c[i]);
	sort(c.begin(),c.end());
	long long res=0;
	priority_queue<long long> optimalPlacement;
	for(int i=0;i<=k;i++)
		optimalPlacement.push(0);
	for(int i=n-1;i>=0;i--)
	{
		long long v = optimalPlacement.top();
		res+=v;
		optimalPlacement.pop();
		optimalPlacement.push(c[i]+v);
	}
	printf("%lld\n",res);
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n,k;
	scanf("%d%d",&n,&k);
	vector<long long> c(n);
	for(int i=0;i<n;i++)
		scanf("%lld",&c[i]);
	sort(c.begin(),c.end());
	long long res=0;
	priority_queue<long long> optimalPlacement;
	for(int i=0;i<=k;i++)
		optimalPlacement.push(0);
	for(int i=n-1;i>k;i--)
	{
		long long v = c[i] + optimalPlacement.top();
		res+=v;
		optimalPlacement.pop();
		optimalPlacement.push(v);
	}
	printf("%lld\n",res);
}


#include <bits/stdc++.h>
#define int long long
using namespace std;
inline int read(){
	register int x=0;
	register bool f=0;
	register char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-') f=1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		x=(x<<3)+(x<<1)+c-48;
		c=getchar();
	}
	return f?-x:x;
}
char cr[200],str[200];int tt;
inline void print(int x,char k='\n') {
    if(!x) putchar('0');
    if(x < 0) putchar('-'),x=-x;
    while(x) cr[++tt]=x%10+'0',x/=10;
    while(tt) putchar(cr[tt--]);
    putchar(k);
}
const int maxn=1e6+10;
int n,k,a[maxn],ans;
priority_queue<int> q;
signed main(){
	n=read();k=read()+1;
	for(int i=1;i<=n;i++){
		a[i]=read();
	}
	sort(a+1,a+n+1);
	reverse(a+1,a+n+1);
	int tmp=0,wh;
	for(wh=1;wh<=n;wh++){
		ans+=tmp;
		if(tmp+a[wh]<0) break;
		tmp+=a[wh];
	}
	if(n-wh+1<=k){
		print(ans);
	}
	n-=k;
	for(int i=1;i<k;i++){
		q.push(0);
	}
	q.push(tmp);
	for(int i=wh;i<=n;i++){
		tmp=q.top();q.pop();
		tmp+=a[i];
		ans+=tmp;
		q.push(tmp);
	}
	print(ans);
	return 0;
}


#include <bits/stdc++.h>
#define int long long
using namespace std;
inline int read(){
	register int x=0;
	register bool f=0;
	register char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-') f=1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		x=(x<<3)+(x<<1)+c-48;
		c=getchar();
	}
	return f?-x:x;
}
char cr[200],str[200];int tt;
inline void print(int x,char k='\n') {
    if(!x) putchar('0');
    if(x < 0) putchar('-'),x=-x;
    while(x) cr[++tt]=x%10+'0',x/=10;
    while(tt) putchar(cr[tt--]);
    putchar(k);
}
const int maxn=1e6+10;
int n,k,a[maxn],ans;
priority_queue<int> q;
signed main(){
	n=read();k=read()+1;
	for(int i=1;i<=n;i++){
		a[i]=read();
	}
	sort(a+1,a+n+1);
	reverse(a+1,a+n+1);
	int tmp=0,wh;
	for(wh=1;wh<=n;wh++){
		ans+=tmp;
		if(tmp+a[wh]<0) break;
		tmp+=a[wh];
	}
	if(n-wh+1<=k){
		print(ans);
		return 0;
	}
	n-=k;
	for(int i=1;i<k;i++){
		q.push(0);
	}
	q.push(tmp);
	for(int i=wh;i<=n;i++){
		tmp=q.top();q.pop();
		tmp+=a[i];
		ans+=tmp;
		q.push(tmp);
	}
	print(ans);
	return 0;
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;

typedef vector<int> vi

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  }


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  return 0;

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back

#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n

  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;

  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;

  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)

#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;

typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;

typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <math.h>
#include <iterator>
#define ll long long
using namespace std;
int main() {

    ll int n,a,b,i;
    cin>>n;
    if(n==1){
        cout << "8 9"<<endl;
    }else{

        if(n%2==0){
            a=n+2;
            cout << "2 "<<a<<endl;
        }else{
            a=n*n;
            b=a+n;
            cout << b<<" "<<a<<endl;

        }

    }

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;

  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

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

 mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <math.h>
#include <iterator>
#define ll long long
using namespace std;
int main() {

    ll int n,a,b,i;
    cin>>n;
    if(n==1){
        cout << "9 8"<<endl;
    }else{

        if(n%2==0){
            a=n+2;
            cout << a<<" 2"<<endl;
        }else{
            a=n*n;
            b=a+n;
            cout << b<<" "<<a<<endl;

        }

    }

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first

  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back

#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

using namespace std;
int main() {
 long long int n;
  cin >> n;

 long long int a = rand()%(long long int)1e8;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;

  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <math.h>
#include <iterator>
#define ll long long
using namespace std;
int main() {

    ll int n,a,b,i;
    cin>>n;
    if(n==1){
        cout << "9 8"<<endl;
    }else{

        if(n%2==0){
            a=n+4;
            cout << a<<" 4"<<endl;
        }else{
            a=n*n;
            b=a+n;
            cout << b<<" "<<a<<endl;

        }

    }

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;

  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main()

  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';

}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <bits/stdc++.h>
#include <chrono>
 using namespace std;
int main() {
 ll int n;
  cin >> n;

 ll int a = rand()%1e8;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  return 0;
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;

 cout << a + n << ' ' << a << '\n';
  }


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';

 }


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;

  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;

  cout << a + n << ' ' << a << '\n';
  return


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;

typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <bits/stdc++.h>
#include <chrono>
 using namespace std;
int main() {
 int n;
  cin >> n;

  int a = rand()%1e8;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;

typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {

  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;

typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;

 cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()

#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  return 0;
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;

typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;

typedef vector<vpii> vvpii;
typedef long long i64;

typedef vector<i64> vi64;

typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

int main() {
 // ios::sync_with_stdio(0);
 // cin.tie(0);
 // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  //int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = rand()%1e8;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;

  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


#include <bits/stdc++.h>

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  return 0;
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;

 int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
  return


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first

#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;

typedef long long i64;

typedef vector<i64> vi64;
typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}


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

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define f first
#define s second

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int n;
  cin >> n;
  int first = uniform_int_distribution<int>(3123, 32485342)(rng);
  int a = first;
  if ((a & 1) == 1) a++;
  cout << a + n << ' ' << a << '\n';
}