P11568 [chaynOI R1 T1] One-Dimensional Array.

Background

![](https://cdn.luogu.com.cn/upload/image_hosting/tc5is950.png)

Description

You are given two positive integers $n, m$. You need to construct two positive integers $x, y$ (with no leading $0$), such that $x$ has $n$ digits, $y$ has $m$ digits, and $x \times y$ is a palindrome number. Please make sure your constructed output is valid, otherwise you will bear the consequences.

Input Format

One line with two positive integers $n, m$.

Output Format

One line with two integers, representing $x, y$.

Explanation/Hint

For $100\%$ of the testdata, $n, m \le 10^3$. **This problem uses bundled tests.** - Subtask 1 (25pts): $n, m \le 6$. - Subtask 2 (10pts): $m = 1$. - Subtask 3 (65pts): No special constraints. Translated by ChatGPT 5