using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { new Magatro().Solve(); } } public class Magatro { private long N; private int Mod = (int)1e9 + 7; private long[] Anser = new long[] { 0l, 1l, 101l, 10101l, 1010101l, 101010101l, 10101010101l, 1010101010101l, 101010101010101l, 10101010101010101l, 1010101010101010101l }; private void Scan() { N = long.Parse(Console.ReadLine()); } private long Pow(long a, long b, long mod) { long result = 1; while (b > 0) { if (b % 2 == 1) { result *= a; result %= mod; } a *= a; a %= mod; b /= 2; } return result; } private long Function(long i, long mod) { if (i == 0) { return 0; } if (i == 1) { return 1; } if (i % 2 == 1) { long res = Function(i - 1, mod) * 100 + 1; res %= mod; return res; } else { long res = Function(i / 2, mod); res *= Pow(100, i / 2, mod) + 1; res %= mod; return res; } } public void Solve() { Scan(); Console.WriteLine(Function(N, Mod)); Console.WriteLine(Anser[N % 11]); } }