#include using namespace std; #define int long long #define Rep(i, N) for(int i = 0; i < N; i++) //101010030ずれてそうだよね const int mod = 1e9 + 7; signed main() { int N; int ans1 = 0, ans2 = 0; cin >> N; int temp = (N - 1) / 5; int offset = (101010030 * temp) % mod; //ずれが分かる int val = N % 5; if(!val) val = 5; Rep(i, val) { ans1 = ans1 * 100 + 1; } (ans1 += offset) %= mod; Rep(i, N % 11) { ans2 = ans2 * 100 + 1; } cout << ans1 << endl << ans2 << endl; return 0; }