Little X has met the following problem recently. 

Let's define f(x) as the sum of digits in decimal representation of number x (for example, f(1234) = 1 + 2 + 3 + 4). You are to calculate <image>

Of course Little X has solved this problem quickly, has locked it, and then has tried to hack others. He has seen the following C++ code: 
    
    
      
        ans = solve(l, r) % a;  
        if (ans <= 0)  
          ans += a;  
      
    

This code will fail only on the test with <image>. You are given number a, help Little X to find a proper test for hack.

Input

The first line contains a single integer a (1 ≤ a ≤ 1018).

Output

Print two integers: l, r (1 ≤ l ≤ r < 10200) — the required test data. Leading zeros aren't allowed. It's guaranteed that the solution exists.

Examples

Input

46


Output

1 10


Input

126444381000032


Output

2333333 2333333333333
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class C {

    static BigInteger[] sumForRound;
    static BigInteger[] tenPow;


    static void solve() throws IOException {
        long m = in.nextLong();
        if ( m == 1 ) {
            out.println( "1 1" );
            return;
        }
        BigInteger M = BigInteger.valueOf( m );
        sumForRound = new BigInteger[201];
        sumForRound[0] = BigInteger.ZERO;
        sumForRound[1] = BigInteger.valueOf( 45 );
        tenPow = new BigInteger[201];
        tenPow[0] = BigInteger.ONE;
        tenPow[1] = BigInteger.TEN;
        for ( int i = 2; i < sumForRound.length; i ++ ) {
            tenPow[i] = tenPow[i - 1].multiply( BigInteger.TEN );
            sumForRound[i] = sumForRound[1].multiply( tenPow[i - 1] ).multiply(BigInteger.valueOf(i));
        }
        int[] can = new int[2000];
        Arrays.fill(can, -1);
        for ( int i = 0; ; i ++ ) {
            BigInteger s = count( BigInteger.valueOf( i ) );
            if ( s.compareTo( BigInteger.valueOf( 2000 ) ) < 0 ) {
                can[s.intValue()] = i;
            } else {
                break;
            }
        }

        BigInteger TWO = BigInteger.valueOf( 2 );
        BigInteger l = BigInteger.ONE;
        BigInteger r = l;
        BigInteger search = BigInteger.ZERO;
        for ( int i = 1; ; i ++ ) {
            search = search.add( M );
            do {
                r = r.multiply( TWO );
            } while ( count( r ).compareTo( search ) < 0 );
            while ( l.compareTo( r ) < 0 ) {
                BigInteger mid = l.add( r ).divide( TWO );
                if ( count( mid ).compareTo( search ) < 0 ) {
                    l = mid.add( BigInteger.ONE );
                } else {
                    r = mid;
                }
            }
            int rem = count( l ).remainder( M ).intValue();
            if ( can[rem] >= 0 ) {
                out.println( ( can[rem] + 1 ) + " " + l );
                return;
            }
        }
    }

    static BigInteger count(BigInteger max) {
//        out.println( max );
        BigInteger maxt = max;
        ArrayList<Integer> d = new ArrayList<>();
        while ( !max.equals(BigInteger.ZERO)) {
            BigInteger[] dr = max.divideAndRemainder(BigInteger.TEN);
            d.add(dr[1].intValue());
            max = dr[0];
        }

        BigInteger r = BigInteger.ZERO;
        for ( int i = d.size() - 1; i >= 0; i -- ) {
            Integer cd = d.get(i);
            BigInteger curD = BigInteger.valueOf( cd );
            maxt = maxt.subtract( tenPow[i].multiply( curD ) );
            r = r.add( maxt.add( BigInteger.ONE ).multiply( curD ) );
            r = r.add(sumForRound[i].multiply(curD));
            r = r.add(tenPow[i].multiply(BigInteger.valueOf(cd * (cd - 1) / 2)));
        }
//        out.println( r );
        return r;
    }

    static Scanner in;
//    static StreamTokenizer in;
    static PrintWriter out;

//    static int nextInt() throws IOException {
//        in.nextToken();
//        return ( int ) in.nval;
//    }

    public static void main( String[] args ) throws IOException {
        in = new Scanner( System.in );
//        in = new StreamTokenizer( new InputStreamReader( System.in ) );
        out = new PrintWriter( System.out );
        solve();
        out.close();
    }
}
