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.util.*;
import java.io.*;
import java.math.*;
import java.text.*;
public class Main
{
  static FastScanner in = new FastScanner(System.in);
  static StringBuilder sb = new StringBuilder();
  static DecimalFormat df = new DecimalFormat();
  static long A;
  public static void main(String[] args)
  {
    df.setMaximumFractionDigits(20);
    df.setMinimumFractionDigits(20);
    // String formatted = df.format(0.2);
    // Never sort array of primitive type
    A = in.nextLong();
    BigInteger x = g(20);
    // [0, 10^20-1] -> x
    // [A-x, 10^20-1+A-x] -> 0

    System.out.print(b(A).subtract(x));
    System.out.print(' ');
    BigInteger r = b(1);
    for (int i = 0; i < 20; i++)
      r = r.multiply(b(10));
    r = r.subtract(b(1));
    r = r.add(b(A));
    r = r.subtract(x);
    System.out.print(r);
    System.out.println();
  }
  // g(x) = f(0) + ... + f(10^x-1)
  static BigInteger g(int x)
  {
    if (x == 0) return b(0);
    BigInteger ret = g(x-1);
    ret = ret.multiply(b(10));
    BigInteger p = b(45);
    for (int i = 0; i < x-1; i++)
      p = p.multiply(b(10));
    // p = 4.5 * 10 ^ x
    ret = ret.add(p);
    ret = ret.mod(b(A));
    return ret;
  }

  static BigInteger b(long n) { return BigInteger.valueOf(n);}
  static BigInteger b(String s) { return new BigInteger(s); }
  static BigDecimal bd(double d) { return BigDecimal.valueOf(d);}
  static BigDecimal bd(String s) { return new BigDecimal(s); }
}
class FastScanner
{
  BufferedReader reader;
  StringTokenizer tokenizer;
  FastScanner (InputStream inputStream)
  {
    reader = new BufferedReader(new InputStreamReader(inputStream));
  }
  String nextToken()
  {
    while (tokenizer == null || ! tokenizer.hasMoreTokens())
    {
      try {
        tokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e){}
    }
    return tokenizer.nextToken();
  }
  boolean hasNext()
  {
    if (tokenizer == null || ! tokenizer.hasMoreTokens())
    {
      try {
        tokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e){ return false; }
    }
    return true;
  }
  long nextLong()
  {
    return Long.parseLong(nextToken());
  }
}
