using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.Text.RegularExpressions;
    using System.Text;
     
    public class Program
    {
        public void Proc() {
            Reader.IsDebug = false;
            long num = long.Parse(Reader.ReadLine());
            Console.WriteLine(GetAns(num));
            Console.WriteLine(GetNum(num%11));
        }

        private const decimal ModNum = 1000000000 + 7;
        private Dictionary<long, decimal> Mul10Dic = new Dictionary<long, decimal>();
        private decimal Get10Mul(long num) {
            if(Mul10Dic.ContainsKey(num)) {
                return Mul10Dic[num];
            }
            
            decimal ans = 0;
            if(num > 5) {
                long half = num/2;
                ans = Get10Mul(half)*Get10Mul(num-half)%ModNum;
            } else {
                ans = 1;
                for(int i=1; i<=num; i++) {
                    ans*=100;
                }
                ans = ans % ModNum;
            }
            Mul10Dic[num] = ans;
            return ans;
        }

        private Dictionary<long, decimal> dic = new Dictionary<long, decimal>();

        private decimal GetAns(long num) {
            if(dic.ContainsKey(num)) {
                return dic[num];
            }
            decimal ans = 0;
            if(num <= 5) {
                ans = GetNum(num)%ModNum;
            } else {
                long half = num / 2;
                decimal tmp = GetAns(num-half)*Get10Mul(half)%ModNum;
                tmp = tmp + GetAns(half);
                ans = tmp%ModNum;
            }
            dic[num] = ans;
            return ans;
        }
        private long GetNum(long num) {
            if(num == 0) {
                return 0;
            }
            long ret = 1;
            for(int i=2; i<=num; i++) {
                ret = ret * 100 + 1;
            }
            return ret;
        }

        public class Reader {
            public static bool IsDebug = true;
            private static System.IO.StringReader SReader;
            private static string InitText = @"



999999999999999999


";
            public static string ReadLine() {
                if(IsDebug) {
                    if(SReader == null) {
                        SReader = new System.IO.StringReader(InitText.Trim());
                    }
                    return SReader.ReadLine();
                } else {
                    return Console.ReadLine();
                }
            }
        }
        public static void Main(string[] args)
        {
            Program prg = new Program();
            prg.Proc();
        }
    }