#include using namespace std; #define _p(...) (void)printf(__VA_ARGS__) #define forr(x,arr) for(auto&& x:arr) #define _overload3(_1,_2,_3,name,...) name #define _rep2(i,n) _rep3(i,0,n) #define _rep3(i,a,b) for(int i=int(a);i=int(a);i--) #define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define bit(n) (1LL<<(n)) #define sz(x) ((int)(x).size()) #define fst first #define snd second using ll=long long; using pii=pair;using pll=pair;using pil=pair;using pli=pair; using vs=vector;using vvs=vector;using vvvs=vector; using vb=vector;using vvb=vector;using vvvb=vector; using vi=vector;using vvi=vector;using vvvi=vector; using vl=vector;using vvl=vector;using vvvl=vector; using vd=vector;using vvd=vector;using vvvd=vector; using vpii=vector;using vvpii=vector;using vvvpii=vector; templateistream&operator>>(istream&is,pair&P){is>>P.fst;is>>P.snd;return is;} templateT read(){T t;cin>>t;return t;} templateostream&operator<<(ostream&o,const pair&p){return o<<'('<ostream&operator<<(ostream&o,const vector&t){o<<"{";rep(i,sz(t))o<void e_r_r(vs::iterator it,T a,Args... args){cerr<substr((*it)[0]==' ',it->length())<<" = "< struct Mint { int x; Mint() : x(0) {} Mint(int y) : x(y >= 0 ? y % MOD : MOD - (-y) % MOD) {} Mint(signed long long sll) : x(sll % MOD) { if (x < 0) x += MOD; } Mint &operator+=(const Mint &rhs){ if((x += rhs.x) >= MOD) x -= MOD; return *this; } Mint &operator-=(const Mint &rhs){ if((x += MOD - rhs.x) >= MOD) x -= MOD; return *this; } Mint &operator*=(const Mint &rhs){ x = 1LL*x*rhs.x % MOD; return *this; } Mint &operator/=(const Mint &rhs){ x = (1LL*x*rhs.inv().x) % MOD; return *this; } Mint operator-() const { return Mint(-x); } Mint operator+(const Mint &rhs) const { return Mint(*this) += rhs; } Mint operator-(const Mint &rhs) const { return Mint(*this) -= rhs; } Mint operator*(const Mint &rhs) const { return Mint(*this) *= rhs; } Mint operator/(const Mint &rhs) const { return Mint(*this) /= rhs; } bool operator<(const Mint &rhs) const { return x < rhs.x; } Mint inv() const { signed a = x, b = MOD, u = 1, v = 0, t; while(b){ t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } return Mint(u); } Mint operator^(unsigned long long t) const { Mint e = *this, res = 1; for(; t; e *= e, t>>=1) if (t & 1) res *= e; return res; } }; template ostream &operator<<(ostream &os, const Mint &rhs) { return os << rhs.x; } template istream &operator>>(istream &is, Mint &rhs) { long long s; is >> s; rhs = Mint(s); return is; }; using mint = Mint; using vm=vector;using vvm=vector;using vvvm=vector; template struct matrix_ { array val; matrix_(vector> ini) { for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) val[i * N + j] = ini[i][j]; } // d=0: zero matrix, d=1: identity matrix matrix_(int d = 0) { for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) val[i * N + j] = T((i == j) * d); } matrix_ operator+(const matrix_ &x) const { matrix_ ret; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) { ret.val[i * N + j] = val[i * N + j] + x.val[i * N + j]; //if (ret.val[i * N + j] > mod) ret.val[i * N + j] -= mod; } return ret; } matrix_ operator*(const matrix_ &x) const { matrix_ ret; for (int i = 0; i < N; i++) for (int k = 0; k < N; k++) for (int j = 0; j < N; j++) { ret.val[i * N + j] += val[i * N + k] * x.val[k * N + j]; //if (ret.val[i * N + j] > mod) ret.val[i * N + j] %= mod; } return ret; } matrix_ operator^(unsigned long long p) const { matrix_ ret(1); matrix_ x(*this); while (p) { if (p & 1) ret = ret * x; x = x * x; p >>= 1; } return ret; } T& at(int row, int col) { return val[row * N + col]; } }; using Mat = matrix_; void Main() { ll n = read(); const Mat ini({{100,0,1}, {1,0,0}, {0,0,1}}); auto a1 = ini ^ n; auto ans1 = a1.val[2]; ll x2 = (n-1) % 11; string ans2; if (x2 == 10) { ans2 = "0"; } else { ans2 += "1"; rep(i, x2) { ans2 += "01"; } } cout << ans1 << endl; cout << ans2 << endl; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }