import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import java.util.*; public class _492 { public static void main(String[] args) throws IOException { new _492().solve(); } void solve() throws IOException { try (final Scanner in = new Scanner(System.in)) { long n = in.nextLong() - 1; BigInteger[][] mat = new BigInteger[][]{ new BigInteger[]{ BigInteger.valueOf(100), BigInteger.ONE }, new BigInteger[]{ BigInteger.ZERO, BigInteger.ONE }, }; BigInteger m1 = BigInteger.valueOf(1000000007); BigInteger m2 = new BigInteger("101010101010101010101"); System.out.println(powmat(n, m1, mat)[0][0].add(powmat(n, m1, mat)[0][1]).mod(m1)); System.out.println(powmat(n, m2, mat)[0][0].add(powmat(n, m2, mat)[0][1]).mod(m2)); } } // long // a [n,v] * b [v,m] => c[n,m] static BigInteger[][] mulmat(BigInteger[][] a, BigInteger[][] b, BigInteger mod) { assert(a[0].length == b.length); final int n = a.length; final int v = b.length; final int m = b[0].length; BigInteger[][] res = new BigInteger[n][m]; for (BigInteger[] r : res) Arrays.fill(r, BigInteger.ZERO); for(int i = 0; i < n; i++) for(int k = 0; k < v; k++) { final BigInteger aa = a[i][k]; for(int j = 0; j < m; j++) { res[i][j] = res[i][j].add(aa.multiply(b[k][j])); } } for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) res[i][j] = res[i][j].mod(mod); return res; } static BigInteger[][] powmat(long r, BigInteger mod, BigInteger[][] mat) { final int n = mat.length; BigInteger[][] x = new BigInteger[n][n]; for (BigInteger[] y : x) Arrays.fill(y, BigInteger.ZERO); for(int i = 0; i < n; i++) { x[i][i] = BigInteger.ONE; } for(;r > 0; r >>>= 1) { if((r&1) == 1) { x = mulmat(x, mat, mod); } mat = mulmat(mat, mat, mod); } return x; } // for debug static void dump(Object... o) { System.err.println(Arrays.deepToString(o)); } }