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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Map;
import java.io.Closeable;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(null, new TaskAdapter(), "", 1 << 29);
        thread.start();
        thread.join();
    }

    static class TaskAdapter implements Runnable {
        @Override
        public void run() {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            FastInput in = new FastInput(inputStream);
            FastOutput out = new FastOutput(outputStream);
            CHackIt solver = new CHackIt();
            solver.solve(1, in, out);
            out.close();
        }
    }

    static class CHackIt {
        public char[] s;
        public BigInteger[][] dp = new BigInteger[30][2];
        public BigInteger[][] way = new BigInteger[30][2];

        public void solve(int testNumber, FastInput in, FastOutput out) {
            long a = in.rl();
            BigInteger ba = BigInteger.valueOf(a);
            Map<BigInteger, BigInteger> map = new HashMap<>();
            for (int i = 0; ; i++) {
                BigInteger atLeast = BigInteger.valueOf(i).multiply(ba);
                BigInteger lo = BigInteger.ZERO;
                BigInteger hi = BigInteger.valueOf(10).pow(20);
                while (hi.compareTo(lo) > 0) {
                    BigInteger mid = lo.add(hi).shiftRight(1);
                    if (count(mid).compareTo(atLeast) >= 0) {
                        hi = mid;
                    } else {
                        lo = mid.add(BigInteger.valueOf(1));
                    }
                }
                BigInteger mod = count(lo).mod(ba);
                if (map.containsKey(mod) && map.get(mod).compareTo(lo) < 0) {
                    out.append(map.get(mod).add(BigInteger.ONE)).append(' ').append(lo);
                    return;
                }
                map.put(mod, lo);
            }
        }

        public BigInteger dp(int pos, int ceil) {
            if (pos == s.length) {
                return BigInteger.ZERO;
            }
            if (dp[pos][ceil] == null) {
                BigInteger ans = BigInteger.ZERO;
                int posVal = s[pos] - '0';
                for (int i = 0; i < 10; i++) {
                    if (ceil == 1 && i > posVal) {
                        continue;
                    }

                    ans = ans.add(dp(pos + 1, ceil == 1 && i == posVal ? 1 : 0)).add(BigInteger.valueOf(i).multiply(way(pos + 1, ceil == 1 && i == posVal ? 1 : 0)));
                }
                dp[pos][ceil] = ans;
            }
            return dp[pos][ceil];
        }

        public BigInteger way(int pos, int ceil) {
            if (pos == s.length) {
                return BigInteger.ONE;
            }
            if (way[pos][ceil] == null) {
                BigInteger ans = BigInteger.ZERO;
                int posVal = s[pos] - '0';
                for (int i = 0; i < 10; i++) {
                    if (ceil == 1 && i > posVal) {
                        continue;
                    }
                    ans = ans.add(way(pos + 1, ceil == 1 && i == posVal ? 1 : 0));
                }
                way[pos][ceil] = ans;
            }
            return way[pos][ceil];
        }

        public BigInteger count(BigInteger n) {
            s = n.toString().toCharArray();
            for (int i = 0; i < 30; i++) {
                for (int j = 0; j < 2; j++) {
                    dp[i][j] = null;
                    way[i][j] = null;
                }
            }
            return dp(0, 1);
        }

    }

    static class FastOutput implements AutoCloseable, Closeable, Appendable {
        private static final int THRESHOLD = 32 << 10;
        private final Writer os;
        private StringBuilder cache = new StringBuilder(THRESHOLD * 2);

        public FastOutput append(CharSequence csq) {
            cache.append(csq);
            return this;
        }

        public FastOutput append(CharSequence csq, int start, int end) {
            cache.append(csq, start, end);
            return this;
        }

        private void afterWrite() {
            if (cache.length() < THRESHOLD) {
                return;
            }
            flush();
        }

        public FastOutput(Writer os) {
            this.os = os;
        }

        public FastOutput(OutputStream os) {
            this(new OutputStreamWriter(os));
        }

        public FastOutput append(char c) {
            cache.append(c);
            afterWrite();
            return this;
        }

        public FastOutput append(Object c) {
            cache.append(c);
            afterWrite();
            return this;
        }

        public FastOutput flush() {
            try {
//            boolean success = false;
//            if (stringBuilderValueField != null) {
//                try {
//                    char[] value = (char[]) stringBuilderValueField.get(cache);
//                    os.write(value, 0, cache.length());
//                    success = true;
//                } catch (Exception e) {
//                }
//            }
//            if (!success) {
                os.append(cache);
//            }
                os.flush();
                cache.setLength(0);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
            return this;
        }

        public void close() {
            flush();
            try {
                os.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        public String toString() {
            return cache.toString();
        }

    }

    static class FastInput {
        private final InputStream is;
        private byte[] buf = new byte[1 << 13];
        private int bufLen;
        private int bufOffset;
        private int next;

        public FastInput(InputStream is) {
            this.is = is;
        }

        private int read() {
            while (bufLen == bufOffset) {
                bufOffset = 0;
                try {
                    bufLen = is.read(buf);
                } catch (IOException e) {
                    bufLen = -1;
                }
                if (bufLen == -1) {
                    return -1;
                }
            }
            return buf[bufOffset++];
        }

        public void skipBlank() {
            while (next >= 0 && next <= 32) {
                next = read();
            }
        }

        public long rl() {
            return readLong();
        }

        public long readLong() {
            int sign = 1;

            skipBlank();
            if (next == '+' || next == '-') {
                sign = next == '+' ? 1 : -1;
                next = read();
            }

            long val = 0;
            if (sign == 1) {
                while (next >= '0' && next <= '9') {
                    val = val * 10 + next - '0';
                    next = read();
                }
            } else {
                while (next >= '0' && next <= '9') {
                    val = val * 10 - next + '0';
                    next = read();
                }
            }

            return val;
        }

    }
}

