////////////includes/////////////////
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
///////////functions/////////////
typedef long long ll;
const int INF = 1 << 29;
inline bool equal(const double& a, const double& b) { return fabs(a - b) < 1e-9; }
inline int two(const int& n) { return 1 << n; }
inline int test(const int& n, const int& b) { return (n >> b) & 1; }
inline void set_bit(int& n, const int& b) { n |= two(b); }
inline void unset_bit(int& n, const int& b) { n &= ~two(b); }
inline int last_bit(const int& n) { return n & (-n); }
inline int ones(int n)
{
    int res = 0;
    while (n && ++res)
        n -= n & (-n);
    return res;
}
template <class T>
void chmax(T& a, const T& b) { a = max(a, b); }
template <class T>
void chmin(T& a, const T& b) { a = min(a, b); }
////////////operator overloading////////////
#ifndef ONLINE_JUDGE
    #define debug(x) cerr << "> " << #x << " = " << x << endl;
#else
    #define debug(x)
#endif

template <typename F, typename S>
ostream& operator<<(ostream& os, const pair<F, S>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v)
{
    os << "[";
    typename vector<T>::const_iterator it;
    for (it = v.begin(); it != v.end(); it++) {
        if (it != v.begin())
            os << ", ";
        os << *it;
    }
    return os << "]";
}

template <typename T>
ostream& operator<<(ostream& os, const set<T>& v)
{
    os << "[";
    typename set<T>::const_iterator it;
    for (it = v.begin(); it != v.end(); it++) {
        if (it != v.begin())
            os << ", ";
        os << *it;
    }
    return os << "]";
}

template <typename F, typename S>
ostream& operator<<(ostream& os, const map<F, S>& v)
{
    os << "{";
    typename map<F, S>::const_iterator it;
    for (it = v.begin(); it != v.end(); it++) {
        if (it != v.begin())
            os << ", ";
        os << it->first << ": " << it->second;
    }
    return os << "}";
}
////////////main////////////
void solution();
int main()
{
    cin.sync_with_stdio(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    solution();
    return 0;
}
/////////////////////////////////////////////////solution////////////////////////////////////////////////////////////

void solution()
{
    int a, b, n;
    cin >> a >> b >> n;

    vector<long long> rng = {
        (long long) ceil((a * pow(10, n)) / b),
        (long long) floor(((a + 1) * pow(10, n) - 1) / b)
    };

    debug(rng);

    for (long long i = rng[0]; i <= rng[1]; i++) {
        if ((i * b) % b == 0)
        {
            cout << i * b << '\n';
            exit(0);
        }
    }
    cout << -1 << '\n';

}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    int a,b,n;
    cin>>a>>b>>n; int c=a;
    for (int i=0;i<n;i++) c=(c*10) +9;
    int h=c,x=0; while (h!=0) {x++;h/=10;}
    while (c>pow(10,x-2)) { int v=0;
      if (c%b!=0)c-=(c%b); int reem=c;
      while (reem!=0 && reem!=a) reem/=10;
      if (reem!=a)continue ;
       int q=c;
        while (q!=a)
        {
            if(q%10==0 || q%b>0)v++;

            q/=10; }

        if (v==0) { cout <<c; return 0;}
        else c-=b;

    }  cout <<"-1";

    return 0;
}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    int c,b,n,h=0;
    cin>>c>>b>>n;
      string say,reem;
      c=c*10;n--;
     while (c%b!=0 &&h!=10 )  {
        c++;h++; }
        if (c%b!=0) cout <<"-1";
        else { int a=c;
            while(c!=0) {
                reem+=(c%10)+'0' ;
                c/=10;
            }
            for (int i=reem.size()-1;i>=0;i--)
                say +=reem[i];
            for (int i=0;i<n;i++)
                say+='0';
            for (int i=0;i<n;i++) {
                if (a>b) break ;
                    a*=10; }
            if (a<b) cout <<"-1";
            else cout <<say;
        }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long Start,Db,Mrat,temp,temp2;
    string x;
    cin >>Start>>Db>>Mrat;

            Start*=10;
            temp=Start;
        if((ceil((double)temp/Db)*Db)<=(Start+10)&&(ceil((double)temp/Db)*Db)>=(Start)){
            Start=ceil((double)temp/Db)*Db;

        }else{

            cout <<-1;
            return 0;
        }
        cout <<Start;
        for(int i=0;i<Mrat-1;i++){
            cout <<'0';
        }

    return 0;
}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    int a,b,n;
    cin>>a>>b>>n; int c=a;
    for (int i=0;i<n;i++) c=(c*10) +9;
    int h=c,x=0; while (h!=0) {x++;h/=10;}
    while (c>pow(10,x-1)) { int v=0;
      if (c%b!=0)c-=(c%b);
       int q=c;
        while (q!=0)
        {
            if(q%10==0)v++;
            q/=10;
        }
        if (v==0) { cout <<c; return 0;}

    }  cout <<"-1";

    return 0;
}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    long long  a,b,n;
    cin>>a>>b>>n; long long  c=a;
    for (int i=0;i<n;i++) c=(c*10) +9;
    long long  h=c,x=0; while (h!=0) {x++;h/=10;}
    while (c>pow(10,x-2)) { long long  v=0;
      if (c%b!=0)c-=(c%b); long long  reem=c;
      while (reem!=0 && reem!=a) reem/=10;
      if (reem!=a)continue ;
       long long q=c;
        while (q!=a)
        {
            if(q%10==0 || q%b>0)v++;

            q/=10; }

        if (v==0) { cout <<c; return 0;}
        else c-=b;

    }  cout <<"-1";

    return 0;
}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    int c,b,n,h=0;
    cin>>c>>b>>n;
      string say,reem;
      c=c*10;
     while (c%b!=0 &&h!=10)  {
        c++;h++; }
        if (c%b!=0) cout <<"-1";
        else {
            while(c!=0) {
                reem+=(c%10)+'0' ;
                c/=10;
            }
            for (int i=reem.size()-1;i>=0;i--)
                say +=reem[i];
            for (int i=0;i<n-1;i++)
                say+='0';
            cout <<say;
        }

    return 0;
}


#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
    int c,b,n,h=0;
    cin>>c>>b>>n;
      string say,reem;
      c=c*10;n--;
     while (c%b!=0 &&h!=9 )  {
        c++;h++; }
        if (c%b!=0) cout <<"-1";
        else { int a=c;
            while(c!=0) {
                reem+=(c%10)+'0' ;
                c/=10;
            }
            for (int i=reem.size()-1;i>=0;i--)
                say +=reem[i];
            for (int i=0;i<n;i++)
                say+='0';
            for (int i=0;i<n;i++) {
                if (a>b) break ;
                    a*=10; }
            if (a<b) cout <<"-1";
            else cout <<say;
        }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define oo 1000000007
const int N = 105;
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
    int a, b, n, temp;
    bool found = 0;
    scanf("%d%d%d", &a, &b, &n);
    for(int i=0;i<9;i++){
        temp = a*10+i;
        if(!(temp%b)) found = 1, break;
    }
    if(found){
        printf("%d", temp);
        for(int i=0;i<n-1;i++) printf("0");
    } else printf("-1");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define oo 1000000007
const int N = 105;
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
    int a, b, n, temp;
    scanf("%d%d%d", &a, &b, &n);
    for(int i=0;i<9;i++){
        temp += a*10+i;
        if(!(temp%b)) break;
    }
    printf("%d", temp);
    for(int i=0;i<n-1;i++) printf("0");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define oo 1000000007
const int N = 105;
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
    int a, b, n, temp;
    scanf("%d%d%d", &a, &b, &n);
    for(int i=0;i<9;i++){
        temp = a*10+i;
        if(!(temp%b)) break;
    }
    printf("%d", temp);
    for(int i=0;i<n-1;i++) printf("0");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define oo 1000000007
const int N = 105;
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
    int a, b, n, temp;
    bool found = 0;
    scanf("%d%d%d", &a, &b, &n);
    for(int i=0;i<9;i++){
        temp = a*10+i;
        if(!(temp%b)) {found = 1; break;}
    }
    if(found){
        printf("%d", temp);
        for(int i=0;i<n-1;i++) printf("0");
    } else printf("-1");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define oo 1000000007
const int N = 105;
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
    int a, b, n, temp;
    bool found = 0;
    scanf("%d%d%d", &a, &b, &n);
    for(int i=0;i<10;i++){
        temp = a*10+i;
        if(!(temp%b)) {found = 1; break;}
    }
    if(found){
        printf("%d", temp);
        for(int i=0;i<n-1;i++) printf("0");
    } else printf("-1");
	return 0;
}


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

/*
                    Author          : Borhan Uddin Rafi
                    University      : Begum Rokeya University,Rangpur.
                    Date            : 23 August,2020;
*/

///************************Start Of Template*************************///

#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#define Read_Fast    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define PI acos(-1)
#define all(a) a.begin(),a.end()
#define f first
#define s second
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define f0(i,n) for(i=0;i<n;i++)
#define f1(i,n) for(i=1;i<n;i++)
#define f1n(i,n) for(i=1;i<=n;i++)
#define szf sizeof()
#define sz size()
#define ln length()
#define mem(x,r) memset(x,r,sizeof(x))
#define inf 1000000000000
using namespace std;
using ll=long long;
const int N=1e2;

map<string,string>maap;

//////graph////////
vector<int>circle;
bool vis[N];
int parent[N];
int chk[N];
int color[N];
int tim[2][N];
int dis[N];
int position[N];
vector<int>adj[N];
vector<int>adj1[N];
//vector<pair<ll,ll>>adj[N];
vector<int>graph[N];
bool has_cycle;
int maxdis,maxnode,Totnode,depth=1;
bool ok;
queue<int>q;
stack<int>stk;
vector<int>solution;
int indegree[N];
int go[N];
int to[N];
map<int,int>mp1;
vector<pair<int,int>>vec;
int arr[20+4];

//////graph////////

/*** this solution will not work if freopen  terminal are open................
    If you close that freopen then its work here.
    But before submission you need to open freopen line when submit .text file***/

////calculate the path //////

//////////main function////////

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    Read_Fast;
    int t;
    // cin>>t;
    int cas=0;
    //  while(t--)
    //  {
    ll n,m,i,j,cnt1=0,cnt2=0,cnt=0,even=0,odd=0,len,k,r,l,z=0,x=0,y=0,flag=0,sum=0;
    ll a=0,b=0,c=0,d=0,ans=0LL,rem,quot,zero=0,fst=0,null=0,snd=0,lst=0,rone=0,one=0,pos=0,neg=0,mn=INT_MAX,mx=INT_MIN;

    char ch;

    ////Time/////
    int h1,h2,m1,m2,h;

    ////motion ////
    int velo1,velo2,ac1,ac2,time;

    /////Graph///
    int node,edge,u,v,cost;
    int best,worst;
    double nd,ad,bd,xd;
    string str,str1="",str2="",str3="",strstore1="",strstore2="";

    //////Input Node //////

    cin>>str>>k>>n;

    for(int i=1; i<=n; i++)
    {
        str1="";
        str1=str;
        flag=0;
        for(char ch='0'; ch<='9'; ch++)
        {
            str1+=ch;
            x=stoi(str1);
            if(x%k==0)
            {
                str=str1;
                flag=1;
                break;
            }
            else
            {
                str1="";
                str1=str;
            }
        }
        if(!flag)
        {
            cout<<-1<<endl;
            return 0;
        }
    }

    cout<<str<<endl;

    //  }
    return 0;
    //////***###            ٱلْحَمْدُ لِلَّٰهِ          ###***//////

}


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

/*
                    Author          : Borhan Uddin Rafi
                    University      : Begum Rokeya University,Rangpur.
                    Date            : 23 August,2020;
*/

///************************Start Of Template*************************///

#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#define Read_Fast    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define PI acos(-1)
#define all(a) a.begin(),a.end()
#define f first
#define s second
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define f0(i,n) for(i=0;i<n;i++)
#define f1(i,n) for(i=1;i<n;i++)
#define f1n(i,n) for(i=1;i<=n;i++)
#define szf sizeof()
#define sz size()
#define ln length()
#define mem(x,r) memset(x,r,sizeof(x))
#define inf 1000000000000
using namespace std;
using ll=long long;
const int N=1e2;

map<string,string>maap;

//////graph////////
vector<int>circle;
bool vis[N];
int parent[N];
int chk[N];
int color[N];
int tim[2][N];
int dis[N];
int position[N];
vector<int>adj[N];
vector<int>adj1[N];
//vector<pair<ll,ll>>adj[N];
vector<int>graph[N];
bool has_cycle;
int maxdis,maxnode,Totnode,depth=1;
bool ok;
queue<int>q;
stack<int>stk;
vector<int>solution;
int indegree[N];
int go[N];
int to[N];
map<int,int>mp1;
vector<pair<int,int>>vec;
int arr[20+4];

//////graph////////

/*** this solution will not work if freopen  terminal are open................
    If you close that freopen then its work here.
    But before submission you need to open freopen line when submit .text file***/

////calculate the path //////

//////////main function////////

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    Read_Fast;
    int t;
    // cin>>t;
    int cas=0;
    //  while(t--)
    //  {
    ll n,m,i,j,cnt1=0,cnt2=0,cnt=0,even=0,odd=0,len,k,r,l,z=0,x=0,y=0,flag=0,sum=0;
    ll a=0,b=0,c=0,d=0,ans=0LL,rem,quot,zero=0,fst=0,null=0,snd=0,lst=0,rone=0,one=0,pos=0,neg=0,mn=INT_MAX,mx=INT_MIN;

    char ch;

    ////Time/////
    int h1,h2,m1,m2,h;

    ////motion ////
    int velo1,velo2,ac1,ac2,time;

    /////Graph///
    int node,edge,u,v,cost;
    int best,worst;
    double nd,ad,bd,xd;
    string str,str1="",str2="",str3="",strstore1="",strstore2="";

    //////Input Node //////

    cin>>m>>k>>n;

    if(m%k)
    {
        x=m%k;
        y=m;
        flag=0;
        for(int i=0; i<=9; i++)
        {
            y*=10;
            y+=i;
            if(y%k==0)
            {
                m=y;
                flag=1;
                n--;
                break;
            }
            else
            {
                y=m;
            }
        }
        if(flag)
        {
            cout<<m;
            for(int i=1; i<=n; i++)
            {
                cout<<0;
            }
            cout<<endl;
        }
        else
        {
            cout<<-1<<endl;
        }
    }
    else
    {
        cout<<m;
        for(int i=1; i<=n; i++)
        {
            cout<<0;
        }
        cout<<endl;
    }

    //  }
    return 0;
    //////***###            ٱلْحَمْدُ لِلَّٰهِ          ###***//////

}


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

/*
                    Author          : Borhan Uddin Rafi
                    University      : Begum Rokeya University,Rangpur.
                    Date            : 23 August,2020;
*/

///************************Start Of Template*************************///

#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#define Read_Fast    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define PI acos(-1)
#define all(a) a.begin(),a.end()
#define f first
#define s second
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define f0(i,n) for(i=0;i<n;i++)
#define f1(i,n) for(i=1;i<n;i++)
#define f1n(i,n) for(i=1;i<=n;i++)
#define szf sizeof()
#define sz size()
#define ln length()
#define mem(x,r) memset(x,r,sizeof(x))
#define inf 1000000000000
using namespace std;
using ll=long long;
const int N=1e2;

map<string,string>maap;

//////graph////////
vector<int>circle;
bool vis[N];
int parent[N];
int chk[N];
int color[N];
int tim[2][N];
int dis[N];
int position[N];
vector<int>adj[N];
vector<int>adj1[N];
//vector<pair<ll,ll>>adj[N];
vector<int>graph[N];
bool has_cycle;
int maxdis,maxnode,Totnode,depth=1;
bool ok;
queue<int>q;
stack<int>stk;
vector<int>solution;
int indegree[N];
int go[N];
int to[N];
map<int,int>mp1;
vector<pair<int,int>>vec;
int arr[20+4];

//////graph////////

/*** this solution will not work if freopen  terminal are open................
    If you close that freopen then its work here.
    But before submission you need to open freopen line when submit .text file***/

////calculate the path //////

//////////main function////////

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    Read_Fast;
    int t;
    // cin>>t;
    int cas=0;
    //  while(t--)
    //  {
    ll n,m,i,j,cnt1=0,cnt2=0,cnt=0,even=0,odd=0,len,k,r,l,z=0,x=0,y=0,flag=0,sum=0;
    ll a=0,b=0,c=0,d=0,ans=0LL,rem,quot,zero=0,fst=0,null=0,snd=0,lst=0,rone=0,one=0,pos=0,neg=0,mn=INT_MAX,mx=INT_MIN;

    char ch;

    ////Time/////
    int h1,h2,m1,m2,h;

    ////motion ////
    int velo1,velo2,ac1,ac2,time;

    /////Graph///
    int node,edge,u,v,cost;
    int best,worst;
    double nd,ad,bd,xd;
    string str,str1="",str2="",str3="",strstore1="",strstore2="";

    //////Input Node //////

    cin>>m>>k>>n;

    if(m%k)
    {
        x=m%k;
        y=m;
        flag=0;
        for(int i=1; i<=9; i++)
        {
            y*=10;
            y+=i;
            if(y%k==0)
            {
                m=y;
                flag=1;
                n--;
                break;
            }
            else
            {
                y=m;
            }
        }
        if(flag)
        {
            cout<<m;
            for(int i=1; i<=n; i++)
            {
                cout<<0;
            }
            cout<<endl;
        }
        else
        {
            cout<<-1<<endl;
        }
    }
    else
    {
        cout<<m;
        for(int i=1; i<=n; i++)
        {
            cout<<0;
        }
        cout<<endl;
    }

    /* for(int i=1; i<=n; i++)
     {
         str1="";
         str1=str;
         flag=0;
         for(char ch='0'; ch<='9'; ch++)
         {
             str1+=ch;
             x=stoi(str1);
             if(x%k==0)
             {
                 str=str1;
                 flag=1;
                 break;
             }
             else
             {
                 str1="";
                 str1=str;
             }
         }
         if(!flag)
         {
             cout<<-1<<endl;
             return 0;
         }
     }

     cout<<str<<endl;*/

    //  }
    return 0;
    //////***###            ٱلْحَمْدُ لِلَّٰهِ          ###***//////

}


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

/*
                    Author          : Borhan Uddin Rafi
                    University      : Begum Rokeya University,Rangpur.
                    Date            : 23 August,2020;
*/

///************************Start Of Template*************************///

#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#define Read_Fast    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define PI acos(-1)
#define all(a) a.begin(),a.end()
#define f first
#define s second
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define f0(i,n) for(i=0;i<n;i++)
#define f1(i,n) for(i=1;i<n;i++)
#define f1n(i,n) for(i=1;i<=n;i++)
#define szf sizeof()
#define sz size()
#define ln length()
#define mem(x,r) memset(x,r,sizeof(x))
#define inf 1000000000000
using namespace std;
using ll=long long;
const int N=1e2;

map<string,string>maap;

//////graph////////
vector<int>circle;
bool vis[N];
int parent[N];
int chk[N];
int color[N];
int tim[2][N];
int dis[N];
int position[N];
vector<int>adj[N];
vector<int>adj1[N];
//vector<pair<ll,ll>>adj[N];
vector<int>graph[N];
bool has_cycle;
int maxdis,maxnode,Totnode,depth=1;
bool ok;
queue<int>q;
stack<int>stk;
vector<int>solution;
int indegree[N];
int go[N];
int to[N];
map<int,int>mp1;
vector<pair<int,int>>vec;
int arr[20+4];

//////graph////////

/*** this solution will not work if freopen  terminal are open................
    If you close that freopen then its work here.
    But before submission you need to open freopen line when submit .text file***/

////calculate the path //////

//////////main function////////

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    Read_Fast;
    int t;
    // cin>>t;
    int cas=0;
    //  while(t--)
    //  {
    ll n,m,i,j,cnt1=0,cnt2=0,cnt=0,even=0,odd=0,len,k,r,l,z=0,x=0,y=0,flag=0,sum=0;
    ll a=0,b=0,c=0,d=0,ans=0LL,rem,quot,zero=0,fst=0,null=0,snd=0,lst=0,rone=0,one=0,pos=0,neg=0,mn=INT_MAX,mx=INT_MIN;

    char ch;

    ////Time/////
    int h1,h2,m1,m2,h;

    ////motion ////
    int velo1,velo2,ac1,ac2,time;

    /////Graph///
    int node,edge,u,v,cost;
    int best,worst;
    double nd,ad,bd,xd;
    string str,str1="",str2="",str3="",strstore1="",strstore2="";

    //////Input Node //////

    cin>>m>>k>>n;

    if(m%k)
    {
        x=m%k;
        y=m;
        flag=0;
        for(int i=0; i<=9; i++)
        {
            y*=10;
            y+=i;
            if(y%k==0)
            {
                m=y;
                flag=1;
                n--;
                break;
            }
            else
            {
                y=m;
            }
        }
        if(flag)
        {
            cout<<m;
            for(int i=1; i<=n; i++)
            {
                cout<<0;
            }
            cout<<endl;
        }
        else
        {
            cout<<-1<<endl;
        }
    }
    else
    {
        cout<<m;
        for(int i=1; i<=n; i++)
        {
            cout<<0;
        }
        cout<<endl;
    }

    /* for(int i=1; i<=n; i++)
     {
         str1="";
         str1=str;
         flag=0;
         for(char ch='0'; ch<='9'; ch++)
         {
             str1+=ch;
             x=stoi(str1);
             if(x%k==0)
             {
                 str=str1;
                 flag=1;
                 break;
             }
             else
             {
                 str1="";
                 str1=str;
             }
         }
         if(!flag)
         {
             cout<<-1<<endl;
             return 0;
         }
     }

     cout<<str<<endl;*/

    //  }
    return 0;
    //////***###            ٱلْحَمْدُ لِلَّٰهِ          ###***//////

}


#include<iostream>
using namespace std;

int main()
{
    unsigned long long a,c,b,n;

    int i,flag;

    cin>>a>>b>>n;

    while(n!=0)
    {
        flag=0;

        for(i=0;i<=9;i++)
        {
            c=a*10+i;

            if(c%b==0)
            {
                a=c;
                flag=1;
                break;
            }
        }
        if(flag==0)
            break;
        n--;
    }
    if(flag==0)
        cout<<"-1\n";
    else
        cout<<a;

    return 0;
}


#include<iostream>
#include<string>
#include<sstream>

using namespace std;

int main()
{
    string a;
    string f;

    long b,n;
    int flag=0;

    cin>>a>>b>>n;

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

        stringstream con(f);
        long x=0;
        con>>x;

        if(x%b==0)
        {
            flag=1;
            a=f;
            n--;
            break;
        }
    }
    if(flag==0)
        cout<<"-1\n";
    else
    {
        while(n!=0)
        {
            a.append(1,'0');
            n--;
        }
        cout<<a;
    }
    return 0;

}


#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main()
{
    long b,n;
    string a,f;
    int flag;

    cin>>a>>b>>n;

    while(n!=0)
    {
        flag=0;

        for(int i=0;i<=9;i++)
        {
            f=a;
            f += std::to_string(i);

            stringstream con(f);
            long x=0;
            con>>x;

            if(x%b==0)
            {
                flag=1;
                a=f;
                break;
            }
        }
        if(flag==0)
            break;
        n--;
    }

    if(flag==0)
        cout<<"-1\n";
    else
        cout<<a;

    return 0;
}


#include<iostream>
using namespace std;

int main()
{
    long long a,c;
    long b,n;

    int i,flag;

    cin>>a>>b>>n;

    while(n!=0)
    {
        flag=0;

        for(i=0;i<=9;i++)
        {
            c=a*10+i;

            if(c%b==0)
            {
                a=c;
                flag=1;
                break;
            }
        }
        if(flag==0)
            break;
        n--;
    }
    if(flag==0)
        cout<<"-1\n";
    else
        cout<<a;

    return 0;
}


#include<stdio.h>
int main(){
	int a,b,c,count;
	scanf("%d %d %d",&a,&b,&c);
	getchar();
	for(int d=0;d<c;d++){
		count = a%10;
		a=a*10;
		for(int e=0;e<10;e++){
			a=a+1;
			if(a%10 == count){
				continue;
			}
			else if(a%b == 0){
				break;
			}

		}

	}
	if(a%b != 0){
		printf("-1\n");
	}
	else{
		printf("%d\n",a);
	}
	return 0;
}


#include<stdio.h>
int main(){
	long long int a,b,c,count;
	scanf("%lld %lld %lld",&a,&b,&c);
	getchar();
	for(int d=0;d<c;d++){
		count = a%10;
		a=a*10;
		for(int e=0;e<10;e++){
			a=a+1;
			if(a%10 == count){
				continue;
			}
			else if(a%b == 0){
				break;
			}
		}
		if(a%b != 0){
			printf("-1\n");
			return 0;
		}

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

	return 0;
}


#include <stdio.h>

int main(){

    long long a, b, c;
    scanf("%lld %lld %lld", &a, &b, &c);
    int flag=1;
    for(int i=0; i<10;i++){
     if(((a*10)+i)%b==0){
      printf("%d", a*10+i);
      for(int i=1; i<c;i++){
       printf("0");
   }
   flag=0;
   break;
  }
 }
    if(flag==1){
        printf("-1\n");
    }
    return 0;
}


#include<stdio.h>
int main(){
	int a,b,c,count;
	scanf("%d %d %d",&a,&b,&c);
	getchar();
	for(int d=0;d<c;d++){
		count = a%10;
		a=a*10;
		for(int e=0;e<10;e++){
			a=a+1;
			if(a%10 == count){
				continue;
			}
			else if(a%b == 0){
				break;
			}
		}
		if(a%b != 0){
			printf("-1\n");
			return 0;
		}

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

	return 0;
}


#include<cstdio>
using namespace std;
int main()
{
	int a,b,n;scanf("%d%d%d",&a,&b,&n);
	for(int i=0;i<=9;i++)
		if((a*10+i)%b==0)
		{
			printf("%d",a*10+i);
			for(int j=1;j<n;j++)
				printf("0");
			return 0;
		}
	printf("-1");
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a,b,n,k;
bool check(ll k){
	ll w=1;
	while(1){
		if(k/w==a) return 1;
		else{
			if(w>k) return 0;
			w=w*10;
		}
	 }
}
int main(){
	cin>>a>>b>>n;
	k=b;
	for (int j=0;j<=9;j++){
		k=a*10+j;
		if(k%b==0){
			cout<<k;
			for(int i=1;i<=n-1;i++)
				cout<<"0"<<endl;
			return 0;
		}
	}
	cout<<"-1"<<endl;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<cstdlib>
using namespace std;
int a,b,n;
void dfs(int x,int y,int z)
{
	if(z==0)
	{
		printf("%d",x);
		exit(0);
	}
	for(int i=0;i<=9;i++)
	{
		if((x*10+i)%y==0) dfs(x*10+i,y,z-1);
	}
}
int main()
{
	scanf("%d%d%d",&a,&b,&n);
	dfs(a,b,n);
	printf("%d",-1);
}


#include<bits/stdc++.h>

using namespace std;

int const mx=1000000;
int prime[mx/2];
int arr[mx];
int cnt = 0 , h;

int main () {
	for(int i=2;i<mx;i++){
		if(arr[i]==0){
                prime[cnt]=i;
                cnt++;
			for(int j=i+i ; j < mx ; j += i){
				arr[j] = 1;
			}
		}
	//	else{
     //       prime[cnt]=i;
            //cnt++;
		//}
	}
	int n;
	cin >> n;
	if(n==1){
        cout << "9 8";
	}
	else{
	    for(int i=0;i<=cnt; i++){
            for(int j=i;j<=cnt;j++){
                if(prime[i]+n==prime[j]){
                    h=j;
                    break;
                }
            }
            if(prime[i]+n == prime[h]){
                cout << prime[h]+1 << " " << prime[i]+1;
                break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;

int const mx=10000000;
int prime[mx/2];
int arr[mx];
int cnt = 0 , h;

int main () {
	for(int i=2;i<mx;i++){
		if(arr[i]==0){
                prime[cnt]=i;
                cnt++;
			for(int j=i+i ; j < mx ; j += i){
				arr[j] = 1;
			}
		}
	//	else{
     //       prime[cnt]=i;
            //cnt++;
		//}
	}
	int n;
	cin >> n;
	if(n==1){
        cout << "9 8";
	}
	else{
	    for(int i=0;i<=cnt; i++){
            for(int j=i;j<=cnt;j++){
                if(prime[i]+n==prime[j]){
                    h=j;
                    break;
                }
                else{
                }
            }
            for(int d=1;d<20;d++){
                if(prime[i]+n == prime[h]){
                cout << prime[h]+1 << " " << prime[i]+1;
                break;
            }
                }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = 2e9 + 5;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int n;
int maxprimes = 7;
set<int> primes({2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		int p_ = maxprimes++;
		while (p_<=p){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end();it++){
				if( (p_ % *it)==0 )check=false;
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_++;
		}
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = 2e9 + 5;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int n;
int maxprimes = 7;
set<int> primes({2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		if( ((p+1)%6)!=0 && ( (p-1)%6)!=0 )return false;
		else if(sqrt(p)>=maxprimes){
			for(auto it = primes.begin();it!=primes.end()&&(*it)<=(int)sqrt(p);it++){
				if( (p % *it)==0 ){
					return false;
				}
			}
			return true;

		}
		int p_ = maxprimes+1;
		while (p_<p){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end()&&(*it)<=(int)sqrt(p_);it++){
				if( (p_ % *it)==0 ){
					check=false;
					break;
				}
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_+=(p_%2==0?1:2);
		}
		bool check =true;
		for(auto it = primes.begin();it!=primes.end()&&(*it)<=(int)sqrt(p);it++){
				if( (p % *it)==0 ){check=false;break;}
		}
		return check;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = 2e9 + 5;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int n;
int maxprimes = 7;
set<int> primes({2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		if( ((p+1)%6)!=0 && ( (p-1)%6)!=0 )return false;
		int p_ = maxprimes+1;
		while (maxprimes>=sqrt(p)){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end()&&(*it)<sqrt(p_);it++){
				if( (p_ % *it)==0 )check=false;
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_+=(p_%2==0?1:2);
		}
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = 2e9 + 5;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int n;
int maxprimes = 7;
set<int> primes({2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		if( ((p+1)%6)!=0 && ( (p-1)%6)!=0 )return false;
		int p_ = maxprimes++;
		while (p_<=p){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end()&&(*it)<sqrt(p_);it++){
				if( (p_ % *it)==0 )check=false;
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_++;
		}
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = numeric_limits<unsigned int>::max();
int iinf = numeric_limits<int>::max();
unsigned int minf = numeric_limits<unsigned int>::min();
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head
int n;
int maxprimes = 7;
set<int> primes({1,2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		int p_ = maxprimes++;
		while (p_<=p){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end();it++){
				if( (p_ % *it)==0 )check=false;
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_++;
		}
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define readinput freopen("input.in", "r", stdin)

typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;

mt19937 mrand(random_device{}());
const ll mod=1000000007;
//float inf= numeric_limits<float>::infinity();
unsigned int inf = 2e9 + 5;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int n;
int maxprimes = 7;
unordered_set<int> primes({2,3,5,7});
bool isprime(int p){
	if(p<=maxprimes){
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}else{
		int p_ = maxprimes++;
		while (p_<=p){
			bool check =true;
			for(auto it = primes.begin();it!=primes.end();it++){
				if( (p_ % *it)==0 )check=false;
			}
			if(check){
				primes.insert(p_);
				maxprimes = p_;
			}
			p_++;
		}
		auto it = primes.find(p);
		if(it != primes.end())return true;
		else return false;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	scanf("%d",&n);
	int b=4;
	int a;
	int maxprimes = 7;

	vector<int> primesearch({1,2,3,5,7});
	a = b+n;
	while(isprime(a)||isprime(b)){
		a++;
		b++;
	}
	cout<<a<<" "<<b<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    if(n%2) cout << 3*n << " " << 2*n;
    else cout << 2*n << " " << n;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    if(n%2){
         unsigned long long int a = 3*n;
         unsigned long long int b = 2*n;
         cout << max(a, b) << " " << min(a, b);
    }
    else {
        unsigned long long int a = 2*n;
         unsigned long long int b = n;
        cout << max(a, b) << " " << min(a, b);
    }
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    else if(n == 2){
        cout << 6 << " " << 4;
        return 0;
    }

    if(n%2){
         unsigned long long int a = 3*n;
         unsigned long long int b = 2*n;
         cout << max(a, b) << " " << min(a, b);
    }
    else {
        unsigned long long int a = 2*n;
         unsigned long long int b = n;
        cout << max(a, b) << " " << min(a, b);
    }
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    if(n%2){
         unsigned long long int a = 3*n;
         unsigned long long int b = 2*n;
         cout << a << " " << b;
    }
    else {
        unsigned long long int a = 2*n;
         unsigned long long int b = n;
        cout << a << " " << b;
    }
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    else if(n == 2){
        cout << 6 << " " 4;
        return 0;
    }

    if(n%2){
         unsigned long long int a = 3*n;
         unsigned long long int b = 2*n;
         cout << max(a, b) << " " << min(a, b);
    }
    else {
        unsigned long long int a = 2*n;
         unsigned long long int b = n;
        cout << max(a, b) << " " << min(a, b);
    }
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    int n; cin >> n;
    if(n == 1){
        cout << 9 << " " << 8;
        return 0;
    }
    if(n%2) cout << 3*n << " " << 2*n;
    else cout << 2*n << " " << n;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=t*n;
cout<<k<<" "<<k-t;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=t*n;
cout<<k<<" "<<k-n;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=t+t;
cout<<k<<" "<<t+1;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using namespace std;
int main()

{

int n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n%2==0)
{

    cout<<n*2<<" "<<n;
}
else
{

int t=n+1;
int k=n*t;
cout<<k<<" "<<k-n;

}
return 0;

}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
cout<<n+9<<" "<<n+6;
}
return 0;
}


#include<iostream>
using namespace std;
int main()
{

long long n;
cin>>n;
if(n==1)
{

cout<<"9"<<" "<<"8";
return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

cout<<n*2<<" "<<n;
}
else
{

long long t=n+1;
long long k=n*t;

cout<<k<<" "<<k-n;
}
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=n*t
cout<<k<<" "<<k-t;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using namespace std;
int main()

{

int n;
cin>>n;
if(n%2==0)
{

    cout<<n*2<<" "<<n;
}
else
{

int t=n+1;
int k=t*10;
k=k+t;
cout<<k<<" "<<k-1;

}
return 0;

}


#include<iostream>
using namespace std;
int main()
{

int n;
cin>>n;
if(n==1)
{

cout<<"9"<<" "<<"8";
return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

cout<<n*2<<" "<<n;
}
else
{

int t=n+1;
int k=n*t;

cout<<k<<" "<<k-n;
}
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
cout<<n+9<<" "<<n+9-n;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=n+t;
cout<<k<<" "<<t;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using ll = long long;
using namespace std;
int main()
{
ll n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n+n<<" "<<n;
}
else
{
ll t=n+1;
ll k=t+t;
cout<<k+1<<" "<<t+2;
}
return 0;
}


#include<bits/stdc++.h>
#include<map>
#include<vector>
using namespace std;
int main()

{

int n;
cin>>n;
if(n==1)
{

    cout<<"9"<<" "<<"8";
    return 0;
}
if(n==2)
{
cout<<"6"<<" "<<"4";
return 0;
}
if(n%2==0)
{

    cout<<n*2<<" "<<n;
}
else
{

int t=n+1;
int k=n*t;
cout<<k<<" "<<k-n;

}
return 0;

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
int main()
{
long long int n=0;
cin>>n;
long long int l=10000000000;
bool prime[l+1];
for(unsigned long long int i=1;i<=l;i++)
{
    prime[i]=false;
}
prime[0]=false;
prime[1]=false;

    for(unsigned long long int i=2 ;i*i<=l;i++)
    {
        if(!prime[i])
        {
            for(unsigned long long int j=i+i;j<l;j=j+i)
            {
                 prime[j]=true;
            }
        }
    }

    for(unsigned long long int i=l;i>0;i--)
    {
        if(prime[i])
        {
        unsigned long long int j=i-n;
        if(j>0)
        {
        if(prime[j])
        {
            cout<<i<<" "<<j;
            break;
        }
        }
        }
    }

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
bool isComposite(unsigned long long int n)
{

    if (n <= 1)  return false;
    if (n <= 3)  return false;
    if (n%2 == 0 || n%3 == 0) return true;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return true;

    return false;
}
int main()
{
unsigned long long int n=0;
cin>>n;
unsigned long long int l=10000000000;
    for(unsigned long long int i=l;i>n;i--)
    {
        if(isComposite(i))

        {
        unsigned long long int j=i-n;
        if(j>0)
        {
        if(isComposite(j))

        {
            cout<<i<<" "<<j;
            break;
        }
        }
        }
    }

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
bool isComposite(unsigned long long int n)
{

    if (n <= 1)  return false;
    if (n <= 3)  return false;
    if (n%2 == 0 || n%3 == 0) return true;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return true;

    return false;
}
int main()
{
unsigned long long int n=0;
cin>>n;
unsigned long long int l=1000000000;
    for(unsigned long long int i=l;i>n;i--)
    {
        if(isComposite(i))

        {
        unsigned long long int j=i-n;
        if(j>0)
        {
        if(isComposite(j))

        {
            cout<<i<<" "<<j;
            break;
        }
        }
        }
    }

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
int main()
{
long long int n=0;
cin>>n;
unsigned long long int l=10000000000;

bool prime[l+1];
for(unsigned long long int i=1;i<=l;i++)
{
    prime[i]=false;
}
prime[0]=false;
prime[1]=false;

    for(unsigned long long int i=2 ;i*i<=l;i++)
    {
        if(!prime[i])
        {
            for(unsigned long long int j=i+i;j<l;j=j+i)
            {
                 prime[j]=true;
            }
        }
    }

    for(unsigned long long int i=l;i>0;i--)
    {
        if(prime[i])
        {
        unsigned long long int j=i-n;
        if(j>0)
        {
        if(prime[j])
        {
            cout<<i<<" "<<j;
            break;
        }
        }
        }
    }

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
int main()
{
long long int n=0;
cin>>n;
long long int l=100000;
bool prime[l+1];
for(unsigned long long int i=1;i<=l;i++)
{
    prime[i]=false;
}
prime[0]=false;
prime[1]=false;

    for(unsigned long long int i=2 ;i*i<=l;i++)
    {
        if(!prime[i])
        {
            for(unsigned long long int j=i+i;j<l;j=j+i)
            {
                 prime[j]=true;
            }
        }
    }

    for(unsigned long long int i=l;i>n;i--)
    {
        if(prime[i])
        {
        unsigned long long int j=i-n;
        if(j>0)
        {
        if(prime[j])
        {
            cout<<i<<" "<<j;
            break;
        }
        }
        }
    }

}


#include <bits/stdc++.h>
#include<math.h>
using namespace std;
int main()
{
unsigned long long int n=0;
cin>>n;
bool prime[10000000000];
unsigned long long int l=10000000000;
for(unsigned long long int i=0;i<=l;i++)
{
    prime[i]=false;
}
prime[0]=false;
prime[1]=false;

    for(unsigned long long int i=2 ;i*i<=n;i++)
    {
        if(!prime[i])
        {
            for(unsigned long long int j=i+i;j<=n;j=j+i)
            {
                 prime[j]=true;
            }
        }
    }

    for(unsigned long long int i=10000000000;i>0;i--)
    {
        if(prime[i])
        {
        unsigned long long int j=i-n;
        if(prime[j])
        {
            cout<<i<<" "<<j;
        }
        }
    }

}


#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
#define maxe    1000000000
#define MOD     1000000007
#define hurry   ios_base::sync_with_stdio(false);cin.tie(NULL);
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//data type
#define ll long long int
#define ull unsigned long long int
#define ld                long double
#define bigint            int64_t

#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
//set
#define si             set<int>
#define spl            set< pair<ll,ll> >
#define spi            set< pair<int,int> >
#define spp            set< pair<pair<ll,ll>,ll> >

//pair
#define pll             pair<ll,ll>
#define pi              pai<int,int>

 //vector
#define  vvi            vector< vector<int> > v;
#define  vi             vector<int> v;
#define  vpii           vector< pair<int,int> >
#define vpl             vector< pair<ll,ll> >
#define all(v)          v.begin(),v.end()
#define MINIMUM(a)      *min_element(a.begin(), a.end())
#define MAXIMUM(a)      *max_element(a.begin(), a.end())
#define                  pb push_back
#define mp               make_pair

#define sz(a)            sizeof(a)
#define forn(i,n)        for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)        for(ll (i) = 1 ; (i) <= (n) ; ++(i))
using namespace std;

#define ps(y,x) fixed<<setprecision(y)<<x;
#define F first
#define S second
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) FOR(i,0,(int)n-1)

#define FOREACH_FN(v, fn) for_each(ALL(v), myobject);

#define SORT(a) sort(a.begin(),a.end())
#define RSORT(a) sort(a.rbegin(),a.rend())
#define REV(a) reverse(a.begin(),a.end())
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define deb(x)           cout << #x << "=" << x << endl;

#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

#define W(t)              while(t--)
#define forn(i,n)         for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)         for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n)         for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c)    for(ll (i) = a ; (i) <= (b) ; (i)+=(c))
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define mp                make_pair
#define pb                push_back

const int N =1e+5;
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1)
      res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res%p;
}
ll modInverse(ll n, ll p)
{
  return power(n, p - 2, p);
}

int main()
{
hurry;
#ifndef ONLINE_JUDGE
 freopen("inputs.txt", "r",stdin);
 freopen("output.txt","w",stdout);
#endif
int t,n,b,a,s[N],ans;
t=1;
 //cin>>t;
W(t)
{

   cin>>n;
   if(n&1)
    cout<<9+n<<' '<<"9";
  else
    cout<<8+n<<' '<<"8";

}

}


#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
#define maxe    1000000000
#define MOD     1000000007
#define hurry   ios_base::sync_with_stdio(false);cin.tie(NULL);
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//data type
#define ll long long int
#define ull unsigned long long int
#define ld                long double
#define bigint            int64_t

#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
//set
#define si             set<int>
#define spl            set< pair<ll,ll> >
#define spi            set< pair<int,int> >
#define spp            set< pair<pair<ll,ll>,ll> >

//pair
#define pll             pair<ll,ll>
#define pi              pai<int,int>

 //vector
#define  vvi            vector< vector<int> > v;
#define  vi             vector<int> v;
#define  vpii           vector< pair<int,int> >
#define vpl             vector< pair<ll,ll> >
#define all(v)          v.begin(),v.end()
#define MINIMUM(a)      *min_element(a.begin(), a.end())
#define MAXIMUM(a)      *max_element(a.begin(), a.end())
#define                  pb push_back
#define mp               make_pair

#define sz(a)            sizeof(a)
#define forn(i,n)        for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)        for(ll (i) = 1 ; (i) <= (n) ; ++(i))
using namespace std;

#define ps(y,x) fixed<<setprecision(y)<<x;
#define F first
#define S second
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) FOR(i,0,(int)n-1)

#define FOREACH_FN(v, fn) for_each(ALL(v), myobject);

#define SORT(a) sort(a.begin(),a.end())
#define RSORT(a) sort(a.rbegin(),a.rend())
#define REV(a) reverse(a.begin(),a.end())
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define deb(x)           cout << #x << "=" << x << endl;

#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

#define W(t)              while(t--)
#define forn(i,n)         for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)         for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n)         for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c)    for(ll (i) = a ; (i) <= (b) ; (i)+=(c))
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define mp                make_pair
#define pb                push_back

const int N =1e+5;
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1)
      res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res%p;
}
ll modInverse(ll n, ll p)
{
  return power(n, p - 2, p);
}

int main()
{
hurry;
#ifndef ONLINE_JUDGE
 freopen("inputs.txt", "r",stdin);
 freopen("output.txt","w",stdout);
#endif
int t,n,b,a,s[N],ans;
t=1;
 //cin>>t;
W(t)
{

   cin>>n;
   if(n&1)
    cout<<9+n<' '<<"9";
  else
    cout<<8+n<<' '<<"8";

}

}


#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
#define maxe    1000000000
#define MOD     1000000007
#define hurry   ios_base::sync_with_stdio(false);cin.tie(NULL);
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//data type
#define ll long long int
#define ull unsigned long long int
#define ld                long double
#define bigint            int64_t

#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
//set
#define si             set<int>
#define spl            set< pair<ll,ll> >
#define spi            set< pair<int,int> >
#define spp            set< pair<pair<ll,ll>,ll> >

//pair
#define pll             pair<ll,ll>
#define pi              pai<int,int>

 //vector
#define  vvi            vector< vector<int> > v;
#define  vi             vector<int> v;
#define  vpii           vector< pair<int,int> >
#define vpl             vector< pair<ll,ll> >
#define all(v)          v.begin(),v.end()
#define MINIMUM(a)      *min_element(a.begin(), a.end())
#define MAXIMUM(a)      *max_element(a.begin(), a.end())
#define                  pb push_back
#define mp               make_pair

#define sz(a)            sizeof(a)
#define forn(i,n)        for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)        for(ll (i) = 1 ; (i) <= (n) ; ++(i))
using namespace std;

#define ps(y,x) fixed<<setprecision(y)<<x;
#define F first
#define S second
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) FOR(i,0,(int)n-1)

#define FOREACH_FN(v, fn) for_each(ALL(v), myobject);

#define SORT(a) sort(a.begin(),a.end())
#define RSORT(a) sort(a.rbegin(),a.rend())
#define REV(a) reverse(a.begin(),a.end())
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define deb(x)           cout << #x << "=" << x << endl;

#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

#define W(t)              while(t--)
#define forn(i,n)         for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)         for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n)         for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c)    for(ll (i) = a ; (i) <= (b) ; (i)+=(c))
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define mp                make_pair
#define pb                push_back

const int N =1e+5;
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1)
      res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res%p;
}
ll modInverse(ll n, ll p)
{
  return power(n, p - 2, p);
}

int main()
{
hurry;
#ifndef ONLINE_JUDGE
 freopen("inputs.txt", "r",stdin);
 freopen("output.txt","w",stdout);
#endif
int t,n,b,a,s[N],ans;
t=1;
 //cin>>t;
W(t)
{

   cin>>n;
   if(n&1)
    cout<<<9+n<' '<<"9";
  else
    cout<<8+n<<' '<<"8";

}

}


#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
#define maxe    1000000000
#define MOD     1000000007
#define hurry   ios_base::sync_with_stdio(false);cin.tie(NULL);
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//data type
#define ll long long int
#define ull unsigned long long int
#define ld                long double
#define bigint            int64_t

#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
//set
#define si             set<int>
#define spl            set< pair<ll,ll> >
#define spi            set< pair<int,int> >
#define spp            set< pair<pair<ll,ll>,ll> >

//pair
#define pll             pair<ll,ll>
#define pi              pai<int,int>

 //vector
#define  vvi            vector< vector<int> > v;
#define  vi             vector<int> v;
#define  vpii           vector< pair<int,int> >
#define vpl             vector< pair<ll,ll> >
#define all(v)          v.begin(),v.end()
#define MINIMUM(a)      *min_element(a.begin(), a.end())
#define MAXIMUM(a)      *max_element(a.begin(), a.end())
#define                  pb push_back
#define mp               make_pair

#define sz(a)            sizeof(a)
#define forn(i,n)        for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)        for(ll (i) = 1 ; (i) <= (n) ; ++(i))
using namespace std;

#define ps(y,x) fixed<<setprecision(y)<<x;
#define F first
#define S second
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) FOR(i,0,(int)n-1)

#define FOREACH_FN(v, fn) for_each(ALL(v), myobject);

#define SORT(a) sort(a.begin(),a.end())
#define RSORT(a) sort(a.rbegin(),a.rend())
#define REV(a) reverse(a.begin(),a.end())
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define deb(x)           cout << #x << "=" << x << endl;

#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

#define W(t)              while(t--)
#define forn(i,n)         for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)         for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n)         for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c)    for(ll (i) = a ; (i) <= (b) ; (i)+=(c))
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define mp                make_pair
#define pb                push_back

const int N =1e+5;
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1)
      res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res%p;
}
ll modInverse(ll n, ll p)
{
  return power(n, p - 2, p);
}

int main()
{
hurry;
#ifndef ONLINE_JUDGE
 freopen("inputs.txt", "r",stdin);
 freopen("output.txt","w",stdout);
#endif
int t,n,b,a,s[N],ans;
t=1;
 //cin>>t;
W(t)
{

   cin>>n;
   if(n&1)
    cout<<<9+n<<' '<<"9";
  else
    cout<<8+n<<' '<<"8";

}

}


#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
#define maxe    1000000000
#define MOD     1000000007
#define hurry   ios_base::sync_with_stdio(false);cin.tie(NULL);
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//data type
#define ll long long int
#define ull unsigned long long int
#define ld                long double
#define bigint            int64_t

#define getunique(v) {sort(all(v)); v.erase(unique(all(v)), v.end());}
//set
#define si             set<int>
#define spl            set< pair<ll,ll> >
#define spi            set< pair<int,int> >
#define spp            set< pair<pair<ll,ll>,ll> >

//pair
#define pll             pair<ll,ll>
#define pi              pai<int,int>

 //vector
#define  vvi            vector< vector<int> > v;
#define  vi             vector<int> v;
#define  vpii           vector< pair<int,int> >
#define vpl             vector< pair<ll,ll> >
#define all(v)          v.begin(),v.end()
#define MINIMUM(a)      *min_element(a.begin(), a.end())
#define MAXIMUM(a)      *max_element(a.begin(), a.end())
#define                  pb push_back
#define mp               make_pair

#define sz(a)            sizeof(a)
#define forn(i,n)        for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)        for(ll (i) = 1 ; (i) <= (n) ; ++(i))
using namespace std;

#define ps(y,x) fixed<<setprecision(y)<<x;
#define F first
#define S second
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) FOR(i,0,(int)n-1)

#define FOREACH_FN(v, fn) for_each(ALL(v), myobject);

#define SORT(a) sort(a.begin(),a.end())
#define RSORT(a) sort(a.rbegin(),a.rend())
#define REV(a) reverse(a.begin(),a.end())
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define deb(x)           cout << #x << "=" << x << endl;

#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

#define W(t)              while(t--)
#define forn(i,n)         for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n)         for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n)         for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c)    for(ll (i) = a ; (i) <= (b) ; (i)+=(c))
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define mp                make_pair
#define pb                push_back

const int N =1e+5;
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1)
      res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res%p;
}
ll modInverse(ll n, ll p)
{
  return power(n, p - 2, p);
}

int main()
{
hurry;
#ifndef ONLINE_JUDGE
 freopen("inputs.txt", "r",stdin);
 freopen("output.txt","w",stdout);
#endif
int t,n,b,a,s[N],ans;
t=1;
 //cin>>t;
W(t)
{

   cin>>n;
   if(n&1)
    cout<<<9+n<" "<<"9";
  else
    cout<<8+n<<" '<<"8";

}

}


/*
ID:
TASK:
LANG: C++14
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//
//using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

/*** Typedef ***/
typedef long long ll;
//typedef long long int;
//typedef int ll;
typedef long long int lli;
typedef unsigned long long ull;
typedef    long double   ld;

//typedef    unordered_set<ll>   usll;
//typedef    unordered_multiset<ll>   umsll;

/*** Loops ***/
#define ffit(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)
#define ff1(i,a,b) for(ll i = a; i < b; i++)
#define ff2(i,a,b) for(ll i = b-1; i >= a; i--)
#define ff3(i,a,b,m) for(ll i = a; i <b; i+=m)
#define ipar(ar,n) ll ar[n]; ff1(i,0,n) cin>>ar[i];
#define opar(ar,n) ff1(i,0,n) cout<<ar[i]<<" ";
#define foRev(num) for(ll i = num - 1; i >= 0; i--)
#define forIn(arr, num) for(ll i = 0; i < num; i++) sc1(arr[i]);
#define forIn1(arr, num) for(ll i = 1; i <= num; i++) sc1(arr[i]);
#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\n');
#define apnt(arr, num) for(ll i = 0; i < num; i++) cout << arr[i] << (i + 1 < num ? ' ' : '\n');

/*** Define Values ***/

#define PI acos(-1.0)
#define eps 1e-7
#define size1 15

/*** STLs ***/
#define cu continue
#define br break
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define mem(name, value) memset(name, value, sizeof(name))
#define MN3(n1,n2,n3) min(n1,min(n2,n3))
#define MN4(n1,n2,n3,n4) min(n1,min(n2,min(n3,n4)))
#define MX3(n1,n2,n3) max(n1,max(n2,n3))
#define MX4(n1,n2,n3,n4) max(n1,max(n2,max(n3,n4)))
#define mxar(a,n) *max_element(a,a+n)
#define mnar(a,n) *min_element(a,a+n)
#define arr_sm(a,n) accumulate(a,a+n,0)
#define vc_sm(ve) accumulate(ve.begin(),ve.end(),0)
#define mx_vc(ve) *max_element(ve.begin(),ve.end())
#define mn_vc(ve) *min_element(ve.begin(),ve.end())
//#define endl " \n"

/*** STLs ***/
typedef vector <ll> vll;
#define vvll vector<vll>
typedef set <ll> sll;
typedef multiset <ll> msll;
//typedef multimap <ll> mpll;
typedef queue <ll> qll;
typedef map <ll, ll> mll;
typedef pair <ll, ll> pll;
typedef vector <pair <ll, ll> > vpll;
typedef priority_queue <pair <ll, ll> > pqpll;
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define ml unordered_map<ll,ll>
///typedef    unordered_multiset<int>   umsi;
typedef    unordered_set<ll>   us;

///vector<vector<int>> v(10, vector<int>(20,500)); 2d vector initialization. of 10 rows and 20 columns, with value 500.

/*** Sorts ***/
#define czero(n)                    __builtin_popcountll(n) // count the number of 1's in the bit representation of a number
#define cenzero(n)                  __builtin_ctzll(n) // count the number of zereos from the end of the bit representation of a number until a 1
#define countbegzero(n)             __builtin_clzxll(n)
#define checkparity(n)              __builtin_parityll(n)// checks whether the number of bits are even or odd
#define all(v) (v).begin(), (v).end()
#define rev(v) reverse(all(v))
#define srt(v) sort(all(v))
#define srtgrt(v) sort(all(v), greater<ll>())
#define prsrt greater<pair<int,int>>()
/*** Some Prints ***/
#define ip(n) ll n; cin>>n;
#define ipp(n,k) ll n; cin>>n; ll k; cin>>k;
#define ip3(n,m,k) ll n; cin>>n;ll m;cin>>m; ll k; cin>>k;
#define kl    '\n'
#define no cout << "NO" << '\n'
#define yes cout << "YES" << '\n'
#define case cout << "Case " << t++ << ": ";
//#define ps(x,y)         fixed<<setprecision(y)<<x
#define inf             1e18
#define dbg(x) cout << '>' << #x << ':' << x << kl;
#define trc1(x)                   cerr<<#x<<": "<<x<<kl
#define trc2(x, y)                cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<kl
#define trc3(x, y, z)             cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<kl
#define trc4(a, b, c, d)          cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<kl
#define trc5(a, b, c, d, e)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<kl
#define trc6(a, b, c, d, e, f)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<kl
#define w(x)             ll x; cin>>x; while(x--)
bool isPtSquare(long double x)
{
    long double sr = sqrt(x);
    return ((sr - floor(sr)) == 0);
}

ll facts(ll n,ll mod)
{
	ll prod=1;
	for(ll i=1;i<=n;i++)
	{
		prod=(prod*i)%mod;
	}
	return prod;
}

ll binpow(ll a, ll b, ll mod){
	ll ans = 1;
	while(b){
		if(b&1) ans*=a;
		a*=a;
		ans%=mod;
		a%=mod;
		b/=2;
	}
	return ans;
}
ll mod = 1e9+7;
vector<ll> factors(ll n){ // returns all factors of a given number
    ll lim = sqrt(n);
    vector<ll> f;
    for(int i = 1; i <= lim; i++){
        if(n % i == 0){
            f.push_back(i);
            f.push_back(n / i);
            if(i*i == n){
                f.pop_back();
            }
        }
    }
    return f;
}

ll ceilAB(ll a, ll b){
    return (a + b - 1) / b;
}
ll bigmod(ll n,ll pow)
{
    if(pow==0)
        return 1;
    if(pow==1)
        return n%mod;

    ll ans=bigmod(n,pow/2);
    ans=(ans*ans)%mod;

    if(pow%2==1)
    {
        ans=(ans*n)%mod;
    }
    return ans%mod;
}

const int mxn = 1e3;

ll fact[mxn + 1];
void calcfac(ll n, ll mod = 2e18){
	fact[0]  = 1;
	for(int i = 1; i<=n;++i){
		fact[i] = fact[i-1]*i;
		fact[i] %= mod;
	}
}

ll nCr(ll p, ll q, ll mod = 2e18){
	ll val = fact[p];
	ll invfact = fact[q]*fact[p-q];
	val%=mod;
	invfact%=mod;
	val*=binpow(invfact, mod - 2, mod);
	return val%mod;
}

ll nPr(ll p, ll q, ll mod = 2e18){
	ll val = nCr(p, q, mod);
	val*=fact[q];
	val%=mod;
	return val;
}

bool isprime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;
    if (n % 2 == 0 || n % 3 == 0)
        return false;
    for (int i = 5; i * i <= n; i += 6)
    {
        if ((n % i == 0) || (n % (i + 2) == 0))
            return false;
    }
    return true;
}
ll power(ll x, ll y)
{
    ll temp;
    if(y == 0)
        return 1;
    temp = power(x, y / 2);
    if (y % 2 == 0)
        return temp * temp;
    else
    {
        if(y > 0)
            return (x * temp * temp);
        else
            return ((temp * temp) / x);
    }
}

//ll pmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(; b; b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ll expo(ll x, ll y){ ll res = 1; x = x % mod;  while (y > 0) { if (y & 1)res = (res*x) % mod; y = y>>1;x = (x*x) % mod;}return res;}
//void matmul(ll a[][2], ll b[][2]) { ll tmp[2][2]; for(int i=0; i<2; i++) { for(int j=0; j<2; j++) { tmp[i][j] = 0; for(int k=0; k<2; k++) tmp[i][j] = (tmp[i][j] + a[i][k]*b[k][j]) % mod; }} for(int i=0; i<2; i++) for(int j=0; j<2; j++) a[i][j] = tmp[i][j]; }
//ll fibo(int n)    // returns nth fibonacci number, also S(n) = f(n+2)-1
//{ if(n == 0) return 0; else if(n == 1) return 1; ll T[2][2] = { {0, 1} , {1, 1} }; ll res[2][2] = { {1, 0}, {0,1} }; n--; while(n) { if(n & 1) matmul(res, T); n >>= 1; matmul(T, T); } return res[1][1]; }

#define go(i, a) for (auto &i : a)
#define go1(it, v) for(auto it = v.begin(); it != v.end(); ++it)
#define mk(arr,n,type) type *arr=new type[n];
#define sz(obj) (int(obj.size()))
#define ipve(vc,n) vll vc(n); ff1(i,0,n){cin>>vc[i];}
#define ipvc(vc,n) vll vc; ff1(i,0,n){ip(x);vc.pb(x);}
#define depressed()                    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//bool ans = all_of(arr, arr + 6, [](int x) {return x & 1; } );
const double pi = 3.141592653589793238460;
ll cbtr(ll n,ll m)
{
    ll sm = 1;
    ff1(i,1,m+1)
    {
        sm*=(n-i+1);
        sm/=i;
    }
    return sm;
}
//string a="cdefghijklmnopqrstuvwxyz";
ld f(ld n)
{
    ld sm = 1;
    ff1(i,1,n+1)
    {
        sm*=i;
    }
    return sm;
}
ld pc(ld n, ld k)
{
    ld sm = f(n)/f(n-k);
    return sm;
}
vll prime;
void seive(ll n)
{
    prime.resize(n+1,1);
    iota(prime.begin(), prime.end(), 0);
    prime[0] = 0, prime[1] = 1;
    for (int i = 2; i*i <= n; i++)
        if (prime[i] == i)
            for (int j = i * i; j <= n; j += i)
                prime[j] = i;
}
map< ll, ll > prime_factor(ll n) {
  map< ll, ll > ret;
  for(ll i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
bool p2(ll n)
{
    if(n==0)
        return false;

    return (ceil(log2(n)) == floor(log2(n)));
}
#define cer cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
#define ps(x,y)         fixed<<setprecision(y)<<x
ll modInverse(ll n, ll m){
    return binpow(n, m - 2, m);
}
bool cmp(pair<ll,pll> a, pair<ll,pll> b)
{
     if(a.ff == b.ff)
     {
         if(a.ss.ff == b.ss.ff)
         {
             return a.ss.ss>b.ss.ss;
         }
         return a.ss.ff>b.ss.ff;
     }
     return a.ff<b.ff;
}

void shape_of_voice()
{
 ip(n);
 if(n%2)
 {
     cout<<n+9<<" "<<9;
 }
 else cout<<n<<" "<<n-2;
}

int main()
{
//     ofstream cout ("ride.out");
//     ifstream cin ("ride.in");
    depressed();
  ll t = 1;
  //cin>>t;
  while(t--)
  {
     shape_of_voice();
  }
  return 0;
}

/// OPM ROCKS         8
/***The One Punch Man Workout Routine
100 Push-Ups
100 Sit-Ups
100 Squats
10KM Running (that's 6.2 miles)
Repeat 7 days a week. That's it!***/


/*
ID:
TASK:
LANG: C++14
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//
//using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

/*** Typedef ***/
typedef long long ll;
//typedef long long int;
//typedef int ll;
typedef long long int lli;
typedef unsigned long long ull;
typedef    long double   ld;

//typedef    unordered_set<ll>   usll;
//typedef    unordered_multiset<ll>   umsll;

/*** Loops ***/
#define ffit(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)
#define ff1(i,a,b) for(ll i = a; i < b; i++)
#define ff2(i,a,b) for(ll i = b-1; i >= a; i--)
#define ff3(i,a,b,m) for(ll i = a; i <b; i+=m)
#define ipar(ar,n) ll ar[n]; ff1(i,0,n) cin>>ar[i];
#define opar(ar,n) ff1(i,0,n) cout<<ar[i]<<" ";
#define foRev(num) for(ll i = num - 1; i >= 0; i--)
#define forIn(arr, num) for(ll i = 0; i < num; i++) sc1(arr[i]);
#define forIn1(arr, num) for(ll i = 1; i <= num; i++) sc1(arr[i]);
#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\n');
#define apnt(arr, num) for(ll i = 0; i < num; i++) cout << arr[i] << (i + 1 < num ? ' ' : '\n');

/*** Define Values ***/

#define PI acos(-1.0)
#define eps 1e-7
#define size1 15

/*** STLs ***/
#define cu continue
#define br break
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define mem(name, value) memset(name, value, sizeof(name))
#define MN3(n1,n2,n3) min(n1,min(n2,n3))
#define MN4(n1,n2,n3,n4) min(n1,min(n2,min(n3,n4)))
#define MX3(n1,n2,n3) max(n1,max(n2,n3))
#define MX4(n1,n2,n3,n4) max(n1,max(n2,max(n3,n4)))
#define mxar(a,n) *max_element(a,a+n)
#define mnar(a,n) *min_element(a,a+n)
#define arr_sm(a,n) accumulate(a,a+n,0)
#define vc_sm(ve) accumulate(ve.begin(),ve.end(),0)
#define mx_vc(ve) *max_element(ve.begin(),ve.end())
#define mn_vc(ve) *min_element(ve.begin(),ve.end())
//#define endl " \n"

/*** STLs ***/
typedef vector <ll> vll;
#define vvll vector<vll>
typedef set <ll> sll;
typedef multiset <ll> msll;
//typedef multimap <ll> mpll;
typedef queue <ll> qll;
typedef map <ll, ll> mll;
typedef pair <ll, ll> pll;
typedef vector <pair <ll, ll> > vpll;
typedef priority_queue <pair <ll, ll> > pqpll;
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define ml unordered_map<ll,ll>
///typedef    unordered_multiset<int>   umsi;
typedef    unordered_set<ll>   us;

///vector<vector<int>> v(10, vector<int>(20,500)); 2d vector initialization. of 10 rows and 20 columns, with value 500.

/*** Sorts ***/
#define czero(n)                    __builtin_popcountll(n) // count the number of 1's in the bit representation of a number
#define cenzero(n)                  __builtin_ctzll(n) // count the number of zereos from the end of the bit representation of a number until a 1
#define countbegzero(n)             __builtin_clzxll(n)
#define checkparity(n)              __builtin_parityll(n)// checks whether the number of bits are even or odd
#define all(v) (v).begin(), (v).end()
#define rev(v) reverse(all(v))
#define srt(v) sort(all(v))
#define srtgrt(v) sort(all(v), greater<ll>())
#define prsrt greater<pair<int,int>>()
/*** Some Prints ***/
#define ip(n) ll n; cin>>n;
#define ipp(n,k) ll n; cin>>n; ll k; cin>>k;
#define ip3(n,m,k) ll n; cin>>n;ll m;cin>>m; ll k; cin>>k;
#define kl    '\n'
#define no cout << "NO" << '\n'
#define yes cout << "YES" << '\n'
#define case cout << "Case " << t++ << ": ";
//#define ps(x,y)         fixed<<setprecision(y)<<x
#define inf             1e18
#define dbg(x) cout << '>' << #x << ':' << x << kl;
#define trc1(x)                   cerr<<#x<<": "<<x<<kl
#define trc2(x, y)                cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<kl
#define trc3(x, y, z)             cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<kl
#define trc4(a, b, c, d)          cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<kl
#define trc5(a, b, c, d, e)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<kl
#define trc6(a, b, c, d, e, f)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<kl
#define w(x)             ll x; cin>>x; while(x--)
bool isPtSquare(long double x)
{
    long double sr = sqrt(x);
    return ((sr - floor(sr)) == 0);
}

ll facts(ll n,ll mod)
{
	ll prod=1;
	for(ll i=1;i<=n;i++)
	{
		prod=(prod*i)%mod;
	}
	return prod;
}

ll binpow(ll a, ll b, ll mod){
	ll ans = 1;
	while(b){
		if(b&1) ans*=a;
		a*=a;
		ans%=mod;
		a%=mod;
		b/=2;
	}
	return ans;
}
ll mod = 1e9+7;
vector<ll> factors(ll n){ // returns all factors of a given number
    ll lim = sqrt(n);
    vector<ll> f;
    for(int i = 1; i <= lim; i++){
        if(n % i == 0){
            f.push_back(i);
            f.push_back(n / i);
            if(i*i == n){
                f.pop_back();
            }
        }
    }
    return f;
}

ll ceilAB(ll a, ll b){
    return (a + b - 1) / b;
}
ll bigmod(ll n,ll pow)
{
    if(pow==0)
        return 1;
    if(pow==1)
        return n%mod;

    ll ans=bigmod(n,pow/2);
    ans=(ans*ans)%mod;

    if(pow%2==1)
    {
        ans=(ans*n)%mod;
    }
    return ans%mod;
}

const int mxn = 1e3;

ll fact[mxn + 1];
void calcfac(ll n, ll mod = 2e18){
	fact[0]  = 1;
	for(int i = 1; i<=n;++i){
		fact[i] = fact[i-1]*i;
		fact[i] %= mod;
	}
}

ll nCr(ll p, ll q, ll mod = 2e18){
	ll val = fact[p];
	ll invfact = fact[q]*fact[p-q];
	val%=mod;
	invfact%=mod;
	val*=binpow(invfact, mod - 2, mod);
	return val%mod;
}

ll nPr(ll p, ll q, ll mod = 2e18){
	ll val = nCr(p, q, mod);
	val*=fact[q];
	val%=mod;
	return val;
}

bool isprime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;
    if (n % 2 == 0 || n % 3 == 0)
        return false;
    for (int i = 5; i * i <= n; i += 6)
    {
        if ((n % i == 0) || (n % (i + 2) == 0))
            return false;
    }
    return true;
}
ll power(ll x, ll y)
{
    ll temp;
    if(y == 0)
        return 1;
    temp = power(x, y / 2);
    if (y % 2 == 0)
        return temp * temp;
    else
    {
        if(y > 0)
            return (x * temp * temp);
        else
            return ((temp * temp) / x);
    }
}

//ll pmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(; b; b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ll expo(ll x, ll y){ ll res = 1; x = x % mod;  while (y > 0) { if (y & 1)res = (res*x) % mod; y = y>>1;x = (x*x) % mod;}return res;}
//void matmul(ll a[][2], ll b[][2]) { ll tmp[2][2]; for(int i=0; i<2; i++) { for(int j=0; j<2; j++) { tmp[i][j] = 0; for(int k=0; k<2; k++) tmp[i][j] = (tmp[i][j] + a[i][k]*b[k][j]) % mod; }} for(int i=0; i<2; i++) for(int j=0; j<2; j++) a[i][j] = tmp[i][j]; }
//ll fibo(int n)    // returns nth fibonacci number, also S(n) = f(n+2)-1
//{ if(n == 0) return 0; else if(n == 1) return 1; ll T[2][2] = { {0, 1} , {1, 1} }; ll res[2][2] = { {1, 0}, {0,1} }; n--; while(n) { if(n & 1) matmul(res, T); n >>= 1; matmul(T, T); } return res[1][1]; }

#define go(i, a) for (auto &i : a)
#define go1(it, v) for(auto it = v.begin(); it != v.end(); ++it)
#define mk(arr,n,type) type *arr=new type[n];
#define sz(obj) (int(obj.size()))
#define ipve(vc,n) vll vc(n); ff1(i,0,n){cin>>vc[i];}
#define ipvc(vc,n) vll vc; ff1(i,0,n){ip(x);vc.pb(x);}
#define depressed()                    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//bool ans = all_of(arr, arr + 6, [](int x) {return x & 1; } );
const double pi = 3.141592653589793238460;
ll cbtr(ll n,ll m)
{
    ll sm = 1;
    ff1(i,1,m+1)
    {
        sm*=(n-i+1);
        sm/=i;
    }
    return sm;
}
//string a="cdefghijklmnopqrstuvwxyz";
ld f(ld n)
{
    ld sm = 1;
    ff1(i,1,n+1)
    {
        sm*=i;
    }
    return sm;
}
ld pc(ld n, ld k)
{
    ld sm = f(n)/f(n-k);
    return sm;
}
vll prime;
void seive(ll n)
{
    prime.resize(n+1,1);
    iota(prime.begin(), prime.end(), 0);
    prime[0] = 0, prime[1] = 1;
    for (int i = 2; i*i <= n; i++)
        if (prime[i] == i)
            for (int j = i * i; j <= n; j += i)
                prime[j] = i;
}
map< ll, ll > prime_factor(ll n) {
  map< ll, ll > ret;
  for(ll i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
bool p2(ll n)
{
    if(n==0)
        return false;

    return (ceil(log2(n)) == floor(log2(n)));
}
#define cer cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
#define ps(x,y)         fixed<<setprecision(y)<<x
ll modInverse(ll n, ll m){
    return binpow(n, m - 2, m);
}
bool cmp(pair<ll,pll> a, pair<ll,pll> b)
{
     if(a.ff == b.ff)
     {
         if(a.ss.ff == b.ss.ff)
         {
             return a.ss.ss>b.ss.ss;
         }
         return a.ss.ff>b.ss.ff;
     }
     return a.ff<b.ff;
}

void shape_of_voice()
{
 ip(n);
 if(n%2)
 {
     cout<<n+9<<" "<<9;
 }
 else cout<<n+2<<" "<<2;
}

int main()
{
//     ofstream cout ("ride.out");
//     ifstream cin ("ride.in");
    depressed();
  ll t = 1;
  //cin>>t;
  while(t--)
  {
     shape_of_voice();
  }
  return 0;
}

/// OPM ROCKS         8
/***The One Punch Man Workout Routine
100 Push-Ups
100 Sit-Ups
100 Squats
10KM Running (that's 6.2 miles)
Repeat 7 days a week. That's it!***/


/*
ID:
TASK:
LANG: C++14
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//
//using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

/*** Typedef ***/
typedef long long ll;
//typedef long long int;
//typedef int ll;
typedef long long int lli;
typedef unsigned long long ull;
typedef    long double   ld;

//typedef    unordered_set<ll>   usll;
//typedef    unordered_multiset<ll>   umsll;

/*** Loops ***/
#define ffit(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)
#define ff1(i,a,b) for(ll i = a; i < b; i++)
#define ff2(i,a,b) for(ll i = b-1; i >= a; i--)
#define ff3(i,a,b,m) for(ll i = a; i <b; i+=m)
#define ipar(ar,n) ll ar[n]; ff1(i,0,n) cin>>ar[i];
#define opar(ar,n) ff1(i,0,n) cout<<ar[i]<<" ";
#define foRev(num) for(ll i = num - 1; i >= 0; i--)
#define forIn(arr, num) for(ll i = 0; i < num; i++) sc1(arr[i]);
#define forIn1(arr, num) for(ll i = 1; i <= num; i++) sc1(arr[i]);
#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\n');
#define apnt(arr, num) for(ll i = 0; i < num; i++) cout << arr[i] << (i + 1 < num ? ' ' : '\n');

/*** Define Values ***/

#define PI acos(-1.0)
#define eps 1e-7
#define size1 15

/*** STLs ***/
#define cu continue
#define br break
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define mem(name, value) memset(name, value, sizeof(name))
#define MN3(n1,n2,n3) min(n1,min(n2,n3))
#define MN4(n1,n2,n3,n4) min(n1,min(n2,min(n3,n4)))
#define MX3(n1,n2,n3) max(n1,max(n2,n3))
#define MX4(n1,n2,n3,n4) max(n1,max(n2,max(n3,n4)))
#define mxar(a,n) *max_element(a,a+n)
#define mnar(a,n) *min_element(a,a+n)
#define arr_sm(a,n) accumulate(a,a+n,0)
#define vc_sm(ve) accumulate(ve.begin(),ve.end(),0)
#define mx_vc(ve) *max_element(ve.begin(),ve.end())
#define mn_vc(ve) *min_element(ve.begin(),ve.end())
//#define endl " \n"

/*** STLs ***/
typedef vector <ll> vll;
#define vvll vector<vll>
typedef set <ll> sll;
typedef multiset <ll> msll;
//typedef multimap <ll> mpll;
typedef queue <ll> qll;
typedef map <ll, ll> mll;
typedef pair <ll, ll> pll;
typedef vector <pair <ll, ll> > vpll;
typedef priority_queue <pair <ll, ll> > pqpll;
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define ml unordered_map<ll,ll>
///typedef    unordered_multiset<int>   umsi;
typedef    unordered_set<ll>   us;

///vector<vector<int>> v(10, vector<int>(20,500)); 2d vector initialization. of 10 rows and 20 columns, with value 500.

/*** Sorts ***/
#define czero(n)                    __builtin_popcountll(n) // count the number of 1's in the bit representation of a number
#define cenzero(n)                  __builtin_ctzll(n) // count the number of zereos from the end of the bit representation of a number until a 1
#define countbegzero(n)             __builtin_clzxll(n)
#define checkparity(n)              __builtin_parityll(n)// checks whether the number of bits are even or odd
#define all(v) (v).begin(), (v).end()
#define rev(v) reverse(all(v))
#define srt(v) sort(all(v))
#define srtgrt(v) sort(all(v), greater<ll>())
#define prsrt greater<pair<int,int>>()
/*** Some Prints ***/
#define ip(n) ll n; cin>>n;
#define ipp(n,k) ll n; cin>>n; ll k; cin>>k;
#define ip3(n,m,k) ll n; cin>>n;ll m;cin>>m; ll k; cin>>k;
#define kl    '\n'
#define no cout << "NO" << '\n'
#define yes cout << "YES" << '\n'
#define case cout << "Case " << t++ << ": ";
//#define ps(x,y)         fixed<<setprecision(y)<<x
#define inf             1e18
#define dbg(x) cout << '>' << #x << ':' << x << kl;
#define trc1(x)                   cerr<<#x<<": "<<x<<kl
#define trc2(x, y)                cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<kl
#define trc3(x, y, z)             cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<kl
#define trc4(a, b, c, d)          cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<kl
#define trc5(a, b, c, d, e)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<kl
#define trc6(a, b, c, d, e, f)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<kl
#define w(x)             ll x; cin>>x; while(x--)
bool isPtSquare(long double x)
{
    long double sr = sqrt(x);
    return ((sr - floor(sr)) == 0);
}

ll facts(ll n,ll mod)
{
	ll prod=1;
	for(ll i=1;i<=n;i++)
	{
		prod=(prod*i)%mod;
	}
	return prod;
}

ll binpow(ll a, ll b, ll mod){
	ll ans = 1;
	while(b){
		if(b&1) ans*=a;
		a*=a;
		ans%=mod;
		a%=mod;
		b/=2;
	}
	return ans;
}
ll mod = 1e9+7;
vector<ll> factors(ll n){ // returns all factors of a given number
    ll lim = sqrt(n);
    vector<ll> f;
    for(int i = 1; i <= lim; i++){
        if(n % i == 0){
            f.push_back(i);
            f.push_back(n / i);
            if(i*i == n){
                f.pop_back();
            }
        }
    }
    return f;
}

ll ceilAB(ll a, ll b){
    return (a + b - 1) / b;
}
ll bigmod(ll n,ll pow)
{
    if(pow==0)
        return 1;
    if(pow==1)
        return n%mod;

    ll ans=bigmod(n,pow/2);
    ans=(ans*ans)%mod;

    if(pow%2==1)
    {
        ans=(ans*n)%mod;
    }
    return ans%mod;
}

const int mxn = 1e3;

ll fact[mxn + 1];
void calcfac(ll n, ll mod = 2e18){
	fact[0]  = 1;
	for(int i = 1; i<=n;++i){
		fact[i] = fact[i-1]*i;
		fact[i] %= mod;
	}
}

ll nCr(ll p, ll q, ll mod = 2e18){
	ll val = fact[p];
	ll invfact = fact[q]*fact[p-q];
	val%=mod;
	invfact%=mod;
	val*=binpow(invfact, mod - 2, mod);
	return val%mod;
}

ll nPr(ll p, ll q, ll mod = 2e18){
	ll val = nCr(p, q, mod);
	val*=fact[q];
	val%=mod;
	return val;
}

bool isprime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;
    if (n % 2 == 0 || n % 3 == 0)
        return false;
    for (int i = 5; i * i <= n; i += 6)
    {
        if ((n % i == 0) || (n % (i + 2) == 0))
            return false;
    }
    return true;
}
ll power(ll x, ll y)
{
    ll temp;
    if(y == 0)
        return 1;
    temp = power(x, y / 2);
    if (y % 2 == 0)
        return temp * temp;
    else
    {
        if(y > 0)
            return (x * temp * temp);
        else
            return ((temp * temp) / x);
    }
}

//ll pmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(; b; b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ll expo(ll x, ll y){ ll res = 1; x = x % mod;  while (y > 0) { if (y & 1)res = (res*x) % mod; y = y>>1;x = (x*x) % mod;}return res;}
//void matmul(ll a[][2], ll b[][2]) { ll tmp[2][2]; for(int i=0; i<2; i++) { for(int j=0; j<2; j++) { tmp[i][j] = 0; for(int k=0; k<2; k++) tmp[i][j] = (tmp[i][j] + a[i][k]*b[k][j]) % mod; }} for(int i=0; i<2; i++) for(int j=0; j<2; j++) a[i][j] = tmp[i][j]; }
//ll fibo(int n)    // returns nth fibonacci number, also S(n) = f(n+2)-1
//{ if(n == 0) return 0; else if(n == 1) return 1; ll T[2][2] = { {0, 1} , {1, 1} }; ll res[2][2] = { {1, 0}, {0,1} }; n--; while(n) { if(n & 1) matmul(res, T); n >>= 1; matmul(T, T); } return res[1][1]; }

#define go(i, a) for (auto &i : a)
#define go1(it, v) for(auto it = v.begin(); it != v.end(); ++it)
#define mk(arr,n,type) type *arr=new type[n];
#define sz(obj) (int(obj.size()))
#define ipve(vc,n) vll vc(n); ff1(i,0,n){cin>>vc[i];}
#define ipvc(vc,n) vll vc; ff1(i,0,n){ip(x);vc.pb(x);}
#define depressed()                    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//bool ans = all_of(arr, arr + 6, [](int x) {return x & 1; } );
const double pi = 3.141592653589793238460;
ll cbtr(ll n,ll m)
{
    ll sm = 1;
    ff1(i,1,m+1)
    {
        sm*=(n-i+1);
        sm/=i;
    }
    return sm;
}
//string a="cdefghijklmnopqrstuvwxyz";
ld f(ld n)
{
    ld sm = 1;
    ff1(i,1,n+1)
    {
        sm*=i;
    }
    return sm;
}
ld pc(ld n, ld k)
{
    ld sm = f(n)/f(n-k);
    return sm;
}
vll prime;
void seive(ll n)
{
    prime.resize(n+1,1);
    iota(prime.begin(), prime.end(), 0);
    prime[0] = 0, prime[1] = 1;
    for (int i = 2; i*i <= n; i++)
        if (prime[i] == i)
            for (int j = i * i; j <= n; j += i)
                prime[j] = i;
}
map< ll, ll > prime_factor(ll n) {
  map< ll, ll > ret;
  for(ll i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
bool p2(ll n)
{
    if(n==0)
        return false;

    return (ceil(log2(n)) == floor(log2(n)));
}
#define cer cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
#define ps(x,y)         fixed<<setprecision(y)<<x
ll modInverse(ll n, ll m){
    return binpow(n, m - 2, m);
}
bool cmp(pair<ll,pll> a, pair<ll,pll> b)
{
     if(a.ff == b.ff)
     {
         if(a.ss.ff == b.ss.ff)
         {
             return a.ss.ss>b.ss.ss;
         }
         return a.ss.ff>b.ss.ff;
     }
     return a.ff<b.ff;
}

void shape_of_voice()
{
 ip(n);

 if(n%2)
 {
     cout<<n+9<<" "<<9;
 }
 else cout<<n+2<<" "<<2;
}

int main()
{
//     ofstream cout ("ride.out");
//     ifstream cin ("ride.in");
    depressed();
  ll t = 1;
  //cin>>t;
  while(t--)
  {
     shape_of_voice();
  }
  return 0;
}

/// OPM ROCKS         8
/***The One Punch Man Workout Routine
100 Push-Ups
100 Sit-Ups
100 Squats
10KM Running (that's 6.2 miles)
Repeat 7 days a week. That's it!***/