Let s(x) be sum of digits in decimal representation of positive integer x. Given two integers n and m, find some positive integers a and b such that 

  * s(a) ≥ n, 
  * s(b) ≥ n, 
  * s(a + b) ≤ m. 

Input

The only line of input contain two integers n and m (1 ≤ n, m ≤ 1129).

Output

Print two lines, one for decimal representation of a and one for decimal representation of b. Both numbers must not contain leading zeros and must have length no more than 2230.

Examples

Input

6 5


Output

6 
7


Input

8 16


Output

35 
53

Note

In the first sample, we have n = 6 and m = 5. One valid solution is a = 6, b = 7. Indeed, we have s(a) = 6 ≥ n and s(b) = 7 ≥ n, and also s(a + b) = s(13) = 4 ≤ m.
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class B {
	
	void solve() throws IOException {
		int n = readInt();
		int m = readInt();
		
		if (n * 2 <= m) {
			int[] a = new int[m];
			int[] b = new int[m];
			int c = 0;
			for (int i = 0; i < n; i++)
				a[c++] = 1;
			int s = c;
			while (c < m) 
				b[c++] = 1;
			
			for (int i = 0; i < m; i++) {
				out.print(a[i]);
			}
			out.println();
			while (s < m) {
				out.print(b[s++]);
			}
			return;
		}
		
		char[] an = new char[2230];
		Arrays.fill(an, '0');
		int c = 0, mm = m;
		while (mm > 0) {
			if (mm >= 10) {
				an[c++] = '9';
				mm -= 9;
			} else { 
				an[c++] = (char)(mm + '0');
				mm = 0;
			}
		}
		
		BigInteger a = new BigInteger(new String(an));
		BigInteger aa = new BigInteger(new String(an)).divide(new BigInteger("2"));
		char[] ans1 = aa.toString().toCharArray();
		int count = 0;
		int zn = 0;
		for (int i = 0; i < ans1.length; i++) {
			if (ans1[i] != '0')
				zn++;
			count += (ans1[i] - '0');
		}
		
		if (count >= n) {
			out.println(ans1);
			out.println(ans1);
			return;
		}
		
		for (int i = ans1.length - 1; i > -1; i--) {
			count += 9;
			ans1[i] = '9';
			if (count >= n)
				break;
		}
		
		String ans12 = new String(ans1);
		out.println(ans12);
		BigInteger b = a.add(new BigInteger(ans12).negate());
		out.print(b);
	}
	
	/////////////////////////////////////////////////////////////////////////////
	
	void init() throws FileNotFoundException {
		
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
		
		tok = new StringTokenizer(" ");
	}
	
	/////////////////////////////////////////////////////////////////////////////
	
	long arifProg (long start, long end, long kol) {
		return ((start + end) * kol) >> 1;
	}
	
	long minArr (long[] a, long l, long r) {
		long min = Long.MAX_VALUE;
		
		for (int i = (int) l; i <= r && i < a.length; i++)
			if (min >= a[i]) min = a[i];
		
		return min;
	}
	
	long maxArr (long[] a, long l, long r) {
		long max = Long.MIN_VALUE;
		
		for (int i = (int) l; i <= r && i < a.length; i++)
			if (max <= a[i]) max = a[i];
		
		return max;
	}
	
	long sqrt (long a) {
		long l = 0;
		long r = Math.min((long)Math.sqrt(a) + 1000000000, a);
		long m = 0;
		while (r - l > 1) {
			m = (l + r) / 2;
			if (m*m < a)
				l = m;
			else 
				r = m;
		}
		
		if (r*r == a)
			return r;	
		return l;
	}
	
	long binpow (long a, long n, long m) {
		long res = 1;
		while (n > 0) {
			if ((n & 1) == 1) {
				res *= a;
				if (m != 0) res %= m;
				n--;
			} else {
				a *= a;
				if (m != 0) a %= m;
				n >>= 1;
			}
		}
		return res;
	}
	
	//////////////////////////////////////////////////////////////////////////////
	
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	public static void main(String[] args) {
		new B().run();
	}
	
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	
	void run() {
		try {
			long timeStart = System.currentTimeMillis();
			
			init();
			solve();
			
			out.close();
			
			long timeEnd = System.currentTimeMillis();
			System.err.println("Time = " + (timeEnd - timeStart));
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
	
	//READ//////////////////////////////////////////////////////////////////
	
	String readLine() throws IOException {
		return in.readLine();
	}
	 
	String delimiter = " ";
	
	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine) return null;
			
			tok = new StringTokenizer(nextLine);
		}
		
		return tok.nextToken(delimiter);
	}
	
	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}
	
	long readLong() throws IOException {
		return Long.parseLong(readString());
	}
	
	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}
	
	//ARRAYS READ///////////
	
	int[] readIntArr(int n) throws IOException {
		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = readInt();
		}
		return a;
	}
	
	long[] readLongArr(int n) throws IOException {
		long a[] = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = readLong();
		}
		return a;
	}
	
	double[] readDoubleArr(int n) throws IOException {
		double a[] = new double[n];
		for (int i = 0; i < n; i++) {
			a[i] = readDouble();
		}
		return a;
	}
	
	//*********************************************************************
}