//

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Linq;

namespace sar_cs
{
    public class Program
    {
        public class Parser
        {
            const int BufSize = 25000;
            TextReader s;
            char[] buf = new char[BufSize];
            int bufPos;
            int bufDataSize;
            bool eos;   // eos read to buffer
            int lastChar = -2;
            int nextChar = -2;
            StringBuilder sb = new StringBuilder();

            void FillBuf()
            {
                if (eos) return;
                bufDataSize = s.Read(buf, 0, BufSize);
                if (bufDataSize == 0) eos = true;
                bufPos = 0;
            }

            int Read()
            {
                if (nextChar != -2)
                {
                    lastChar = nextChar;
                    nextChar = -2;
                }
                else
                {
                    if (bufPos == bufDataSize) FillBuf();
                    if (eos) lastChar = -1;
                    else lastChar = buf[bufPos++];
                }
                return lastChar;
            }

            void Back()
            {
                if (lastChar == -2) throw new Exception();  // no chars were ever read
                nextChar = lastChar;
            }

            public Parser()
            {
                s = Console.In;
            }

            public int ReadInt()
            {
                int res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = -sign;
                    c = Read();
                }
                int len = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    if ((uint)(c -= 48) >= 10) throw new InvalidDataException();
                    len++;
                    res = checked(res * 10 - c);
                    c = Read();
                }
                if (len == 0) throw new InvalidDataException();
                Back();
                return checked(res * sign);
            }

            public int ReadLnInt()
            {
                int res = ReadInt(); ReadLine(); return res;
            }

            public long ReadLong()
            {
                long res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = -sign;
                    c = Read();
                }
                int len = 0;
                checked
                {
                    while (c >= 0 && !char.IsWhiteSpace((char)c))
                    {
                        if ((uint)(c -= 48) >= 10) throw new InvalidDataException();
                        len++;
                        res = res * 10 - c;
                        c = Read();
                    }
                    if (len == 0) throw new InvalidDataException();
                    Back();
                    return res * sign;
                }
            }

            public long ReadLnLong()
            {
                long res = ReadInt(); ReadLine(); return res;
            }

            public double ReadDouble()
            {
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));

                int sign = 1;
                if (c == '-')
                {
                    sign = -1;
                    c = Read();
                }

                sb.Length = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    sb.Append((char)c);
                    c = Read();
                }

                Back();
                double res = double.Parse(sb.ToString(), CultureInfo.InvariantCulture);
                return res * sign;
            }

            public string ReadLine()
            {
                int c = Read();
                sb.Length = 0;
                while (c != -1 && c != 13 && c != 10)
                {
                    sb.Append((char)c);
                    c = Read();
                }
                if (c == 13)
                {
                    c = Read();
                    if (c != 10) Back();
                }
                return sb.ToString();
            }

            public bool EOF
            {
                get
                {
                    if (Read() == -1) return true;
                    Back();
                    return false;
                }
            }

            public bool SeekEOF
            {
                get
                {
                L0:
                    int c = Read();
                    if (c == -1) return true;
                    if (char.IsWhiteSpace((char)c)) goto L0;
                    Back();
                    return false;
                }
            }
        }

        static void pe()
        {
            Console.WriteLine("???");
            Environment.Exit(0);
        }

        static void re()
        {
            Environment.Exit(55);
        }

        static int nosol()
        {
            Console.WriteLine("ERROR");
            return 0;
        }

        static Stopwatch sw = Stopwatch.StartNew();

        static StringBuilder sb = new StringBuilder();
        static Random rand = new Random(52345235);

        static void Swap<T>(ref T a, ref T b)
        {
            T t = a;
            a = b;
            b = t;
        }

        static char[] suits = { 'C', 'D', 'H', 'S' };
        static char[] values = { '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A' };

        struct Pos
        {
            public int Y, X;
        }

        struct Joker
        {
            public string Name;
            public int Y, X;
        }

        static int h, w;
        static string[,] map;

        static bool Square_SameSuit(int y, int x)
        {
            char suit = '\0';
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j++)
                {
                    if (suit == '\0') suit = map[y + i, x + j][1];
                    else if (suit != map[y + i, x + j][1]) return false;
                }
            return true;
        }

        static bool Square_DistinctValues(int y, int x)
        {
            bool[] usedValues = new bool[values.Length];
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j++)
                {
                    int value = Array.IndexOf<char>(values, map[y + i, x + j][0]);
                    if (value < 0) pe();
                    if (usedValues[value]) return false;
                    usedValues[value] = true;
                }
            return true;
        }

        static bool CheckSquareCombinations(out int y1, out int x1, out int y2, out int x2)
        {
            x1 = y2 = x2 = 0;
            for (y1 = 0; y1 < h - 2; y1++)
                for (x1 = 0; x1 < w - 2; x1++)
                    if (Square_DistinctValues(y1, x1) || Square_SameSuit(y1, x1))
                        for (y2 = 0; y2 < h - 2; y2++)
                            for (x2 = 0; x2 < w - 2; x2++)
                                if (x1 + 3 <= x2 || x2 + 3 <= x1 || y1 + 3 <= y2 || y2 + 3 <= y1)
                                    if (Square_DistinctValues(y2, x2) || Square_SameSuit(y2, x2))
                                        return true;
            return false;
        }

        static int Main(string[] args)
        {
            //MyStructs.BigNum.Test(); return 0;
            //Console.SetIn(File.OpenText("_input"));
            var parser = new Parser();

            while (!parser.SeekEOF)
            {
                var koloda = new HashSet<string>();
                for (int i = 0; i < suits.Length; i++)
                    for (int j = 0; j < values.Length; j++)
                        koloda.Add(values[j].ToString() + suits[i]);

                h = parser.ReadInt();
                w = parser.ReadLnInt();
                map = new string[h, w];
                var jokers = new List<Joker>();
                for (int i = 0; i < h; i++)
                {
                    var ss = parser.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                    if (ss.Length != w) pe();
                    for (int j = 0; j < w; j++)
                    {
                        map[i, j] = ss[j];
                        if (ss[j] == "J1" || ss[j] == "J2") jokers.Add(new Joker { Name = ss[j], Y = i, X = j });
                        else if (!koloda.Remove(ss[j])) pe();
                    }
                }

                string res = null;
                int x1 = 0, y1 = 0, x2 = 0, y2 = 0;

                if (jokers.Count == 0)
                {
                    if (CheckSquareCombinations(out y1, out x1, out y2, out x2)) res = "There are no jokers.";
                }
                else if (jokers.Count == 1)
                {
                    foreach (var c in koloda)
                    {
                        map[jokers[0].Y, jokers[0].X] = c;
                        if (CheckSquareCombinations(out y1, out x1, out y2, out x2))
                        {
                            res = string.Format("Replace {0} with {1}.", jokers[0].Name, c);
                            goto k0;
                        }
                    }
                }
                else if (jokers.Count == 2)
                {
                    jokers.Sort((j1, j2) => j1.Name.CompareTo(j2.Name));
                    foreach (var c1 in koloda)
                        foreach (var c2 in koloda)
                            if (c1 != c2)
                            {
                                map[jokers[0].Y, jokers[0].X] = c1;
                                map[jokers[1].Y, jokers[1].X] = c2;
                                if (CheckSquareCombinations(out y1, out x1, out y2, out x2))
                                {
                                    res = string.Format("Replace J1 with {0} and J2 with {1}.", c1, c2);
                                    goto k0;
                                }
                            }
                }
                else pe();

            k0: ;
                if (res == null)
                    Console.WriteLine("No solution.");
                else
                {
                    Console.WriteLine("Solution exists.");
                    Console.WriteLine(res);
                    Console.WriteLine(string.Format("Put the first square to ({0}, {1}).", y1 + 1, x1 + 1));
                    Console.WriteLine(string.Format("Put the second square to ({0}, {1}).", y2 + 1, x2 + 1));
                }
                //Console.WriteLine();
            }

            return 0;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Xsl;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			//var inputs1 = input1.Split(new[] { ' ', '}', '{' , ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
			//var inputs3 = input3.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();

			long n = long.Parse(input1);

			int length = input1.Length;
			if (length < 2)
			{
				Console.WriteLine(n);
				return;
			}

			long copyN = n;
			while (copyN % 10 == 0)
			{
				copyN--;
			}
			long max = 1;
			while (copyN > 0)
			{
				max *= copyN % 10;
				copyN /= 10;
			}

			for (int i = 1; i < length; i++)
			{
				copyN = n;
				long current = 0;
				for (int j = 0; j < i; j++)
				{
					current += 9 * (long)Math.Pow(10, j);
				}

				var temp = copyN - current;
				temp /= (long)Math.Pow(10, i);
				current += temp * (long)Math.Pow(10, i);

				long currentMax = 1;
				while (current > 0)
				{
					currentMax *= current % 10;
					current /= 10;
				}

				if (currentMax > max)
				{
					max = currentMax;
				}
			}

			Console.WriteLine(max);
		}

		static long Factorial(long a)
		{
			return a > 1 ? a * Factorial(a - 1) : 1;
		}
	}
}


using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Program {
    class MainClass {
        ////////////////////////////////////////////////////////////
        int N, K, T;
        void Solve() {
            io.i(out N, out K,out T);
            int ans = 0;
            if(T<=K){
                ans = Math.Min(N, T);
            }else if( N-T >= 0){
                ans = Math.Min(N, K);
            }else{
                ans = Math.Max(0, K - (T-N));
            }
            io.o(ans);
        }
        ////////////////////////////////////////////////////////////
        public static void Main() { new MainClass().Stream(); }
        IO io = new IO();
        void Stream() { Solve(); io.writeFlush(); }
        //void Stream() { Test(); io.writeFlush(); }
        void Test() { }
        #region MockMacro
        //cannot use break,continue,goto
        void FOR(int a, int b, Action<int> act) { for (int i = a; i < b; ++i) act(i); }
        void FORR(int a, int b, Action<int> act) { for (int i = a - 1; i >= b; --i) act(i); }
        #endregion
        ////////////////////////////////////////////////////////////
    }
    #region default
    class IO {
        TYPE tp;
        string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
        StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        public IO() { nextBuffer = new string[0]; BufferCnt = 0; Console.SetOut(sw); tp = new TYPE(); }
        public string Next() {
            if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++];
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();
            nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            BufferCnt = 0;
            return nextBuffer[BufferCnt++];
        }
        public string String => Next();
        public char Char => char.Parse(String);
        public int Int => int.Parse(String);
        public long Long => long.Parse(String);
        public double Double => double.Parse(String);
        public string[] arr => Console.ReadLine().Split(' ');
        public char[] arrChar => Array.ConvertAll(arr, char.Parse);
        public int[] arrInt => Array.ConvertAll(arr, int.Parse);
        public long[] arrLong => Array.ConvertAll(arr, long.Parse);
        public double[] arrDouble => Array.ConvertAll(arr, double.Parse);
        public T i<T>() { return tp.suitType<T>(String); }
        public void i<T>(out T v) { v = tp.suitType<T>(String); }
        public void i<T, U>(out T v1, out U v2) { i(out v1); i(out v2); }
        public void i<T, U, V>(out T v1, out U v2, out V v3) { i(out v1); i(out v2); i(out v3); }
        public void i<T, U, V, W>(out T v1, out U v2, out V v3, out W v4) {
            i(out v1); i(out v2); i(out v3); i(out v4);
        }
        public void i<T, U, V, W, X>(out T v1, out U v2, out V v3, out W v4, out X v5) {
            i(out v1); i(out v2); i(out v3); i(out v4); i(out v5);
        }
        public void ini<T>(out T[] a, int n) { a = new T[n]; for (int i = 0; i < n; i++) a[i] = tp.suitType<T>(String); }
        public void ini<T, U>(out T[] a, out U[] b, int n) {
            a = new T[n]; b = new U[n]; for (int i = 0; i < n; i++) { a[i] = i<T>(); b[i] = i<U>(); }
        }
        public void ini<T, U, V>(out T[] a, out U[] b, out V[] c, int n) {
            a = new T[n]; b = new U[n]; c = new V[n];
            for (int i = 0; i < n; i++) { a[i] = i<T>(); b[i] = i<U>(); c[i] = i<V>(); }
        }
        public void ini<T>(out T[,] a, int h, int w) {
            a = new T[h, w]; for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) a[i, j] = i<T>();
        }
        public void o<T>(T v) { Console.WriteLine(v); }
        public void o<T>(params T[] a) { Array.ForEach(a, n => o(n)); }
        public void o<T>(T[,] a) { a.GetLength(0).REP(i => { a.GetLength(1).REP(j => or(a[i, j] + " ")); br(); }); }
        public void ol<T>(T v) { Console.Write(v + " "); }
        public void ol<T>(params T[] a) { o(connect<T>(a)); }
        public void or<T>(T a) { Console.Write(a); }
        public void br() { o(""); }
        public void writeFlush() { Console.Out.Flush(); }
        private string connect<T>(params T[] s) { return string.Join(" ", s); }
    }
    class TYPE {
        public bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); }
        public T convertType<T, U>(U v) { return (T)Convert.ChangeType(v, typeof(T)); }
        public T suitType<T>(string s) {
            if (typeEQ<T, int>()) return convertType<T, int>(int.Parse(s));
            if (typeEQ<T, long>()) return convertType<T, long>(long.Parse(s));
            if (typeEQ<T, double>()) return convertType<T, double>(double.Parse(s));
            if (typeEQ<T, char>()) return convertType<T, char>(char.Parse(s));
            return convertType<T, string>(s);
        }
    }
    class PQueue<T> where T : IComparable {
        public List<T> heap; private Comparison<T> comp; private IComparer<T> comparer;
        private int size; private int type;//type=0->min
        public PQueue(int type = 0) : this(Comparer<T>.Default) { this.type = type; }
        public PQueue(IComparer<T> comparer) : this(16, comparer.Compare) { this.comparer = comparer; }
        public PQueue(Comparison<T> comparison) : this(16, comparison) { }
        public PQueue(int capacity, Comparison<T> comparison) { this.heap = new List<T>(capacity); this.comp = comparison; }
        public void Enqueue(T item) {
            this.heap.Add(item); var i = size++;
            while (i > 0) { var p = (i - 1) >> 1; if (Compare(this.heap[p], item) <= 0) break; this.heap[i] = heap[p]; i = p; }
            this.heap[i] = item;
        }
        public T Dequeue() {
            var ret = this.heap[0]; var x = this.heap[--size]; var i = 0;
            while ((i << 1) + 1 < size) {
                var a = (i << 1) + 1; var b = (i << 1) + 2; if (b < size && Compare(heap[b], heap[a]) < 0) a = b;
                if (Compare(heap[a], x) >= 0) break; heap[i] = heap[a]; i = a;
            }
            heap[i] = x; heap.RemoveAt(size);
            return ret;
        }
        public T Peek() { return heap[0]; }
        public int Count { get { return size; } }
        public bool Any() { return size > 0; }
        public bool Empty() { return !Any(); }
        public bool Contains(T v) { return heap.Contains(v); }
        private int Compare(T x, T y) { return type == 0 ? x.CompareTo(y) : y.CompareTo(x); }
    }
    #endregion
    #region other
    class Mat {
        public long mod = 1000000007;//10^9+7
        public long Pow(long a, long b) {
            if (b == 0) return 1;
            if (b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod;
            else return Pow(a * a % mod, b / 2) % mod;
        }
        public long Fact(long n) { long ret = 1; for (long i = 1; i <= n; i++) ret = (ret * i) % mod; return ret; }
        public long ModC(long n, long r) {
            if (r == 0 || n == r) return 1;
            if (n == 0) return 0;
            if (n < 0 || n < r) throw new ArgumentException("n,r invalid");
            else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod;
        }
        public long[,] C(int N) {
            long[,] Co = new long[N + 1, N + 1];
            (N + 1).REP(i => (i + 1).REP(j => Co[i, j] = (j == 0 || j == i) ? 1L : Co[i - 1, j - 1] + Co[i - 1, j]));
            return Co;
        }
        public long DupC(long n, long r) { return ModC(n + r - 1, r); }
        public long P(long n, long r) { return Fact(n) / (Fact(n - r)); }//test
        public bool isPrime(long n) {
            if (n == 2) return true; if (n < 2 || n % 2 == 0) return false;
            for (long v = 3; v <= (long)Math.Sqrt(n); v += 2) if (n % v == 0) return false;
            return true;
        }
        public long LCM(long a, long b) { return a * (b / GCD(a, b)); }
        public long LCM(params long[] a) { return a.Aggregate((v, n) => LCM(v, n)); }
        public long GCD(long a, long b) { if (a < b) Swap(ref a, ref b); return b == 0 ? a : GCD(b, a % b); }
        public long GCD(params long[] array) { return array.Aggregate((v, n) => GCD(v, n)); }
        public T Max<T>(params T[] a) { return a.Max(); }
        public T Min<T>(params T[] a) { return a.Min(); }
        public void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
        public double Dis(int x1, int y1, int x2, int y2) { return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2)); }
        public int mDis(int x1, int y1, int x2, int y2) { return Math.Abs(x1 - x2) + Math.Abs(y1 - y2); }
        public int[] DigArr(int n) { int[] ret = new int[Digit(n)]; ret.Length.REP(i => ret[i] = DigVal(n, i + 1)); return ret; }
        public long DigArr2Num(IEnumerable<int> enu) { return enu.Aggregate((v, n) => v * 10 + n); }
        public int Digit(long n) { return (n == 0) ? 1 : (int)Math.Log10(n) + 1; }
        public int DigVal(int n, int dig) { return (n % (int)Pow(10, dig)) / (int)Pow(10, dig - 1); }
        public long Tousa(long a, long d, long n) { return a + (n - 1) * d; }
        public long TousaSum(long a, long d, long n) { return n * (2 * a + (n - 1) * d) / 2; }
        public long[] enuDivsor(long N) {
            var ret = new SortedSet<long>();
            for (long i = 1; i * i <= N; i++)
                if (N % i == 0) { ret.Add(i); ret.Add(N / i); }
            return ret.ToArray();
        }
        public IEnumerable<int[]> enuP(int[] Arr, int Use = -1) {//列挙順列
            Use = (Use != -1) ? Use : Arr.Length; if (Use == 0 || Arr.Length < Use) yield break;
            var s = new Stack<List<int>>();
            Arr.Length.REPR(i => s.Push(new List<int>() { i }));
            while (s.Count > 0) {
                var cur = s.Pop();
                if (cur.Count == Use) {
                    var ret = new List<int>(); cur.ForEach(X => ret.Add(Arr[X]));
                    yield return ret.ToArray();
                } else
                    Arr.Length.REPR(i => { if (!cur.Contains(i)) s.Push(new List<int>(cur) { i }); });
            }
        }
        public IEnumerable<int[]> enuC(int[] Arr, int Use = -1) {//列挙組み合わせ
            Use = (Use != -1) ? Use : Arr.Length; if (Use == 0 || Arr.Length < Use) yield break;
            var s = new Stack<Tuple<int, List<int>>>();
            Arr.Length.REPR(i => s.Push(Tuple.Create(i, new List<int>() { Arr[i] })));
            while (s.Count > 0) {
                var cur = s.Pop();
                if (cur.Item2.Count == Use) yield return cur.Item2.ToArray();
                else for (int i = Arr.GetUpperBound(0); i > cur.Item1; i--)
                        s.Push(Tuple.Create(i, new List<int>(cur.Item2) { Arr[i] }));
            }
        }
        public IEnumerable<int[]> enuDupP(int[] Arr, int Use = -1) {//列挙重複順列
            Use = (Use != -1) ? Use : Arr.Length; if (Use == 0) yield break; var s = new Stack<List<int>>();
            Arr.Length.REPR(i => s.Push(new List<int>() { Arr[i] }));
            while (s.Count > 0) {
                var cur = s.Pop();
                if (cur.Count == Use) yield return cur.ToArray();
                else Arr.Length.REPR(i => s.Push(new List<int>(cur) { Arr[i] }));
            }
        }
        public IEnumerable<int[]> enuDupC(int[] Arr, int Use = -1) {//列挙組み合わせ
            Use = (Use != -1) ? Use : Arr.Length; if (Use == 0) yield break;
            var s = new Stack<Tuple<int, List<int>>>();
            Arr.Length.REPR(i => s.Push(Tuple.Create(i, new List<int>() { Arr[i] })));
            while (s.Count > 0) {
                var cur = s.Pop();
                if (cur.Item2.Count == Use) yield return cur.Item2.ToArray();
                else for (int i = Arr.GetUpperBound(0); i >= cur.Item1; i--)
                        s.Push(Tuple.Create(i, new List<int>(cur.Item2) { Arr[i] }));
            }
        }
        public IEnumerable<long[]> enuPart(string str) {
            var s = new Stack<Tuple<string, List<long>, int>>();
            s.Push(Tuple.Create(str[0].ToString(), new List<long>(), 1));
            while (s.Count > 0) {
                var cur = s.Pop();
                if (cur.Item3 >= str.Length) yield return (new List<long>(cur.Item2) { cur.Item1.toLong() }).ToArray();
                else {
                    s.Push(Tuple.Create(cur.Item1 + str[cur.Item3], new List<long>(cur.Item2), cur.Item3 + 1));
                    s.Push(Tuple.Create(str[cur.Item3].ToString(), new List<long>(cur.Item2) { cur.Item1.toLong() }, cur.Item3 + 1));
                }
            }
        }
    }
    class Time {
        public int[] M = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
        public int[] D = { 31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
        public Time() { D[1] = 28; }
        public Time(int y) { D[1] = isLeapYear(y) ? 29 : 28; }
        public bool isLeapYear(int y) { return (y % 400 == 0 || (y % 4 == 0 && y % 100 != 0)); }
    }
    #endregion
    #region Data
    class AssociativeArray<T> : IEnumerable {
        public Dictionary<T, int> dic;
        public AssociativeArray() { dic = new Dictionary<T, int>(); }
        public AssociativeArray(params T[] a) { dic = new Dictionary<T, int>(); Add(a); }
        public void Add(T a) { if (!conK(a)) dic[a] = 0; dic[a]++; }
        public void Add(params T[] a) { a.Length.REP(i => { if (!conK(a[i])) dic[a[i]] = 0; dic[a[i]]++; }); }
        public void Set(T k, int v) { if (!dic.ContainsKey(k)) dic[k] = 0; dic[k] = v; }
        public void Remove(params T[] a) { a.Length.REP(i => { if (conK(a[i])) dic.Remove(a[i]); }); }
        public T[] Keys() { return dic.Keys.ToArray<T>(); }
        public int Val(T k) { return (dic.ContainsKey(k)) ? dic[k] : 0; }
        public int ValSum => dic.Values.Sum();
        public int KeyNum => dic.Keys.Count;
        public int MaxVal => dic.Values.Max();
        public int MinVal => dic.Values.Min();
        public T MaxKey => MaxK();
        public T MinKey => MinK();
        public T MaxK() { var maxV = MaxVal; return dic.First(d => d.Value == maxV).Key; }
        public T MinK() { var minV = MinVal; return dic.First(d => d.Value == minV).Key; }
        public bool conK(T k) { return dic.ContainsKey(k); }
        public bool anyK(params T[] k) { return k.Any(key => conK(key)); }
        public bool allK(params T[] k) { return k.All(key => conK(key)); }
        public void Show() { foreach (var v in dic) { Console.WriteLine(v.Key + " : " + v.Value); } }
        public IEnumerator GetEnumerator() { foreach (var kp in dic) yield return kp; }
        public T[] ValueSortedKey(bool inc = true) {//test
            return (inc ? (dic.OrderBy(kp => kp.Value)) : (dic.OrderByDescending(kp => kp.Value)))
                .ThenBy(kp => kp.Key).ToDictionary(kp => kp.Key, kp => kp.Value).Keys.ToArray();
        }
        //:sort->array
    }
    class Index {
        public int[] Comp(int[] bef) {
            int[] aft = new int[bef.Length];
            var tmp = bef.Distinct().OrderBy(v => v).Select((v, i) => new { v, i }).ToDictionary(p => p.v, p => p.i);
            aft = bef.Select(v => tmp[v]).ToArray();
            return aft;
        }
    }
    class TreeDis {//TODO:shortestPath
        public List<Tuple<long, long>>[] g; public long[] a2other; private int type;
        public TreeDis(int type = 0) { this.type = type; }//0->bfs,other->dfs
        public void Init(long n) { g = new List<Tuple<long, long>>[n + 1]; g.Length.REP(i => g[i] = new List<Tuple<long, long>>()); }
        public void Run(long[] a, long[] b) { a.Length.REP(i => { g[a[i]].Add(Tuple.Create(b[i], 1L)); g[b[i]].Add(Tuple.Create(a[i], 1L)); }); }
        public void Run(long[] a, long[] b, long[] w) { a.Length.REP(i => { g[a[i]].Add(Tuple.Create(b[i], w[i])); g[b[i]].Add(Tuple.Create(a[i], w[i])); }); }
        public long[] a2iArr(long a) { a2other = new long[g.Count()]; if (type == 0) BFS(a); else DFS(a); return a2other; }
        private void BFS(long a) {
            var q = new Queue<Tuple<long, long>>(); q.Enqueue(Tuple.Create(a, -1L));
            while (q.Count > 0) {
                var c = q.Dequeue();
                foreach (var v in g[c.Item1]) {
                    if (v.Item1 == c.Item2) continue;
                    a2other[v.Item1] = a2other[c.Item1] + v.Item2; q.Enqueue(Tuple.Create(v.Item1, c.Item1));
                }
            }
        }
        private void DFS(long a) {
            var s = new Stack<Tuple<long, long>>(); s.Push(Tuple.Create(a, -1L));
            while (s.Count > 0) {
                var c = s.Pop();
                foreach (var v in g[c.Item1]) {
                    if (v.Item1 == c.Item2) continue;
                    a2other[v.Item1] = a2other[c.Item1] + v.Item2; s.Push(Tuple.Create(v.Item1, c.Item1));
                }
            }
        }
    }
    class ShortestPath {
        public long INF = (long)1e15; protected int I = -1; protected int V; protected int E; public long[] cost;
        public List<Tuple<int, long>>[] Adj; protected bool isNonDir = true;
        public void Init(int n) { I = n + 1; V = n; Adj = new List<Tuple<int, long>>[I]; I.REP(i => Adj[i] = new List<Tuple<int, long>>()); }
        public void AddPath(int f, int t, long c) {
            E++;
            if (isNonDir) {
                Adj[f].Add(Tuple.Create(t, c)); Adj[t].Add(Tuple.Create(f, c));
            } else {
                Adj[f].Add(Tuple.Create(t, c));
            }
        }
        public void AddPath(int[] f, int[] t, long[] c) { f.Length.REP(i => AddPath(f[i], t[i], c[i])); }
    }
    class Dijkstra : ShortestPath {//隣接対応後検証不足,有向とか
        public long MinCost(int f, int t) {
            cost = new long[I]; cost.Set(INF); cost[f] = 0;
            var pq = new PQueue<Tuple<int, long>>(); pq.Enqueue(Tuple.Create(f, 0L));//(from,cost)
            while (pq.Count > 0) {
                var cur = pq.Dequeue();
                if (cost[cur.Item1] < cur.Item2) continue; Adj[cur.Item1].Count.REP(i => {
                    var tmp = Adj[cur.Item1][i];
                    if (cost[tmp.Item1] > cost[cur.Item1] + tmp.Item2) {
                        cost[tmp.Item1] = cost[cur.Item1] + tmp.Item2; pq.Enqueue(Tuple.Create(tmp.Item1, cost[tmp.Item1]));
                    }
                });
            }
            return cost[t];
        }
    }
    class BellmanFord : ShortestPath {
        private bool[] neg;
        public BellmanFord() { }
        public BellmanFord(bool isNonDir) { this.isNonDir = isNonDir; }
        public long MinCost(int f, int t) {
            cost = new long[I]; cost.Set(INF); cost[f] = 0; neg = new bool[I];
            for (int i = 0; i < I - 1; i++) {
                I.REP(j => Adj[j].Count.REP(k => {
                    var cur = Adj[j][k];
                    if (cost[cur.Item1] > cost[j] + cur.Item2)
                        cost[cur.Item1] = cost[j] + cur.Item2;
                }));
            }
            for (int i = 0; i < I; i++) {
                I.REP(j => Adj[j].Count.REP(k => {
                    var cur = Adj[j][k];
                    if (cost[cur.Item1] > cost[j] + cur.Item2) {
                        cost[cur.Item1] = cost[j] + cur.Item2;
                        neg[cur.Item1] = true;
                    }
                    if (neg[j]) neg[cur.Item1] = true;
                }));
            }
            return cost[t];
        }
        public bool loopExist() { return neg[I - 1]; }
    }
    class WarshallFloyd {//そのうちAdjとどっちがいいか...TODO:ジェネリック
        private int E; private int INF = (int)1e9; public long[,] G;
        public void Init(int n) { E = n + 1; G = new long[E, E]; G.Set(INF); E.REP(i => G[i, i] = 0); }
        public void AddPath(int f, int t, long c) { G[f, t] = c; G[t, f] = c; }
        public void AddPath(int[] f, int[] t) { f.Length.REP(i => AddPath(f[i], t[i], 1)); }
        public void AddPath(int[] f, int[] t, long[] c) { f.Length.REP(i => AddPath(f[i], t[i], c[i])); }
        public void Run() { G = MinCostArr(); }
        public long[,] MinCostArr() { E.REP(i => E.REP(j => E.REP(k => G[j, k] = Math.Min(G[j, k], G[j, i] + G[i, k])))); return G; }
    }
    class UnionFind {
        public long[] parent; public long[] depth; private int I;
        public void Init(int n) { I = n + 1; parent = new long[I]; depth = new long[I]; I.REP(i => parent[i] = i); }
        public long Find(long x) { return (parent[x] == x) ? x : parent[x] = Find(parent[x]); }
        public void Unite(long x, long y) {
            x = Find(x); y = Find(y); if (x == y) return;
            if (depth[x] < depth[y]) parent[x] = y; else { parent[y] = x; if (depth[x] == depth[y]) depth[x]++; }
        }
        public bool Same(int a, int b) { return Find(a) == Find(b); }
        public long Size(int x) { return depth[Find(x)]; }
    }
    class Kruskal : ShortestPath {//TODO:test,
        public long Run() {
            var L = Adj.Select((l, i) => Tuple.Create(i, l[i].Item1, l[i].Item2)).OrderBy(t => t.Item3).ToList();
            //var li = new List<Tuple<int, int, long>>();
            //I.REP(i =>{ foreach (var t in Adj[i]) li.Add(Tuple.Create(i, t.Item1, t.Item2));});
            //li = li.OrderBy(t => t.Item3).ToList();//li = li.OrderByDescending(t => t.Item3).ToList();
            var uf = new UnionFind(); uf.Init(V); long ret = 0;
            foreach (var t in L) {
                if (!uf.Same(t.Item1, t.Item2)) {
                    ret += t.Item3; uf.Unite(t.Item1, t.Item2);
                }
            }
            return ret;
        }
    }
    #endregion
    #region Ex
    static class StringEX {
        public static string Reversed(this string s) { return string.Join("", s.Reverse()); }
        public static string Repeat(this string s, int n) { return string.Concat(Enumerable.Repeat(s, n).ToArray()); }
        public static int toInt(this string s) { int n; return (int.TryParse(s.TrimStart('0'), out n)) ? n : 0; }
        public static int toInt(this char c) { return toInt(c.ToString()); }
        public static int toInt(this char[] c) { return toInt(new string(c)); }
        public static long toLong(this string s) { long n; return (long.TryParse(s.TrimStart('0'), out n)) ? n : (long)0; }
        public static long toLong(this char c) { return toLong(c.ToString()); }
        public static long toLong(this char[] c) { return toLong(new string(c)); }
        public static string toString(this char[] c) { return new string(c); }
    }
    static class NumericEx {
        public static string pad0<T>(this T v, int n) { return v.ToString().PadLeft(n, '0'); }
        public static double RoundOff(this double v, int n) { return Math.Round(v, n - 1, MidpointRounding.AwayFromZero); }
        public static bool Odd(this int v) { return v % 2 != 0; }
        public static bool Odd(this long v) { return v % 2 != 0; }
        public static void REP(this int v, Action<int> act) { for (int i = 0; i < v; ++i) act(i); }
        public static void REPR(this int v, Action<int> act) { for (int i = v - 1; i >= 0; --i) act(i); }
    }
    static class ArrayEX {
        public static T[] Sort<T>(this T[] a) { Array.Sort(a); return a; }
        public static T[] SortR<T>(this T[] a) { Array.Sort(a); Array.Reverse(a); return a; }
        public static void Set<T>(this T[] a, T v) { a.Length.REP(i => a[i] = v); }
        public static void Set<T>(this T[,] a, T v) { a.GetLength(0).REP(i => a.GetLength(1).REP(j => a[i, j] = v)); }
    }
    static class BitEx {
        public static bool Any(this BitArray b) { foreach (bool f in b) if (f) return true; return false; }
        public static bool All(this BitArray b) { foreach (bool f in b) if (!f) return false; return true; }
        public static bool None(this BitArray b) { return !Any(b); }
        public static void Flip(this BitArray b, int index) { b.Set(index, !b.Get(index)); }
    }
    static class IEnumerableEx {
        //
    }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;

class Program
{
    public static int[] Read(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        int[] ret = new int[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = int.Parse(tokens[i]);
        }

        return ret;
    }

    public static long[] ReadLong(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        long[] ret = new long[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = long.Parse(tokens[i]);
        }

        return ret;
    }

    public static double[] ReadDouble(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        double[] ret = new double[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = double.Parse(tokens[i], CultureInfo.InvariantCulture);
        }

        return ret;
    }

    static string Reverse(string s)
    {
        char[] a = s.ToCharArray();
        Array.Reverse(a);
        return new string(a);
    }

    static bool Check(string t)
    {
        for (int i = 0; i < t.Length; i++)
        {
            if (char.IsLetterOrDigit(t[i]) == false && t[i] != '_')
            {
                return false;
            }
        }

        return true;
    }

    static void Main(string[] args)
    {
        int[] abc = Read(Console.ReadLine());
        int[] def = Read(Console.ReadLine());

        if ((abc[0] == 0 && abc[1] == 0 && abc[2] != 0) || (def[0] == 0 && def[1] == 0 && def[2] != 0))
        {
            Console.WriteLine("0");
            return;
        }

        if (abc[0] * def[1] == abc[1] * def[0])
        {
            if (abc[0] * def[2] == abc[2] * def[0] && abc[1] * def[2] == abc[2] * def[1])
            {
                Console.WriteLine("-1");
            }
            else
            {
                Console.WriteLine("0");
            }
        }
        else
        {
            Console.WriteLine("1");
        }
    }
}


using System;

namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int a1 = int.Parse(Console.ReadLine());
            int a2 = int.Parse(Console.ReadLine());
            int k1 = int.Parse(Console.ReadLine());
            int k2 = int.Parse(Console.ReadLine());
            int n = int.Parse(Console.ReadLine());

            int r = a1 * (k1 - 1) + a2 * (k2 - 1);
            int min = (n - r < 0 ? 0 : n-r);
            int max = 0;
            int minCard, maxCard, minTeam, maxTeam;
            if (k1 < k2)
            {
                minCard = k1; minTeam = a1;
                maxCard = k2; maxTeam = a2;
            }
            else
            {
                minCard = k2; minTeam = a2;
                maxCard = k1; maxTeam = a1;
            }
            max = Math.Min(n/minCard,minTeam);
            n -= max*minCard;
            max += Math.Min(n / maxCard, maxTeam);

            Console.WriteLine($"{min} {max}");
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int fl = int.Parse(s[0]);
            int fr = int.Parse(s[1]);
            bool can = false ;
            s = Console.ReadLine().Split(' ');
            int ml = int.Parse(s[0]);
            int mr = int.Parse(s[1]);
            if (fr *2+2 >= ml && fr <= ml + 1)
            {
                can = true;
            } if (fl * 2+2 >= mr && fl <= mr + 1)
            {
                can = true;
            }
            if (can)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }

    }
}


using System;
using System.IO;
using System.Text;

namespace RM_B_298
{
    class Program : InputReader
    {
        static void Main(string[] args)
        {
            string[] s = f.ReadLine().Split(' ');
            int v1 = int.Parse(s[0]), v2 = int.Parse(s[1]);
            s = f.ReadLine().Split(' ');
            int t = int.Parse(s[0]), d = int.Parse(s[1]);

            int[] a = new int[t];
            a[0] = v1;
            a[t - 1] = v2;
            for (int i = 1; i < t - 1; i++)
            {
                a[i] = a[i - 1] + d;
            }

            for (int i = t - 2; i > 0; i--)
            {
                if (a[i] > (a[i + 1] + d))
                {
                    a[i] = a[i + 1] + d;
                }
            }
            int ans = 0;
            for (int i = 0; i < t; i++)
            {
                ans += a[i];
            }
            Console.WriteLine(ans);
            Console.ReadLine();
        }
    }

    class InputReader
    {
        //public static TextReader f = new StreamReader("input.txt");
        public static TextReader f = Console.In;
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace TechnoCup3A
{
    public class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int[] arr = new int[6];
            int max = 0;
            bool flag = false;
            for (int i = 0; i < 6; i++)
            {
                arr[i] = Int32.Parse(str[i]);
                max += arr[i];
            }
            for (int i = 1; i < 6; i++)
            {
                int max1 = arr[0];
                max1 += arr[i];
                for (int j = i + 1; j < 6; j++)
                {
                    max1 += arr[j];
                    if (max1 == max - max1)
                    {
                        Console.Write("YES");
                        flag = true;
                        break;

                    }
                    max1 = arr[0] + arr[i];
                }
                if (flag == true) break;
            }
            if (flag == false) Console.Write("NO");
            //Console.ReadKey();

        }
    }
}


using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int zobmieCount = Convert.ToInt32(Console.ReadLine());

            int brainCount;

            if (zobmieCount % 2 != 0)
                if (zobmieCount == 1)
                {
                    Console.WriteLine("1");
                    return;
                }
                else
                    brainCount = (int)(zobmieCount / 2) + 1;
            else
                brainCount = zobmieCount / 2;

            Console.WriteLine(brainCount);
            //Console.ReadKey();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Web.UI.WebControls;

namespace Codeforces
{
    class Program : IDisposable
    {
        private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());
        private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());

        private void Solve()
        {
            var s = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var c = s[0];
            var v = s[1];
            var vMax = s[2];
            var a = s[3];
            var l = s[4];

            int cnt = v;
            int res = 1;
            int multiplier = 1;
            while (cnt < c)
            {
                if (v + multiplier*a < vMax)
                {
                    cnt+= (v + multiplier * a - l);
                }
                else
                {
                    cnt+= vMax-l;
                }
                multiplier++;
                res++;
            }
            Console.WriteLine(res);
        }

        int BinarySearch(int[] arr, int q)
        {
            var l = 0;
            var r = arr.Length - 1;
            //int med = -1;
            while (l <= r)
            {
                var med = l + (r - l) / 2;
                if (arr[med] == q)
                {
                    return med;
                }
                if (q < arr[med])
                {
                    r = med - 1;
                }
                else
                {
                    l = med + 1;
                }
            }
            return -1;
        }

        static void Main(string[] args)
        {
            var p = new Program();
            p.Solve();
           // Console.ReadLine();
            p.Dispose();
        }

        #region Helpers

        private static int ReadInt()
        {
            return int.Parse(textReader.ReadLine());
        }

        private static long ReadLong()
        {
            return long.Parse(textReader.ReadLine());
        }

        private static int[] ReadIntArray()
        {
            return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }
        #endregion

        public void Dispose()
        {
            textReader.Close();
            textWriter.Close();
        }
    }

    public class ListNode
    {
      public int val;
      public ListNode next;
      public ListNode(int x) { val = x; }
    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

class PairVariable : IComparable<PairVariable>
{
    public int a, b;
    public int c;
    public PairVariable()
    {
        a = b = 0;
        c = 0;
    }
    public PairVariable(string s)
    {
        string[] q = s.Split();
        a = int.Parse(q[0]);
        b = int.Parse(q[1]);
        c = 0;

    }

    public PairVariable(int a, int b, int c)
    {
        this.a = a;
        this.b = b;
        this.c = c;

    }

    public int CompareTo(PairVariable other)
    {
        return this.c.CompareTo(other.c);
    }
}

namespace ConsoleApplication3
{
    class Program
    {

        static bool isPrime(int n)
        {
            for (int i = 2; i <= Math.Sqrt(n); i++)
            {
                if (n % i == 0)
                {
                    return false;
                }
            }
            return true;
        }
        static int gcd(int a, int b)
        {
            if (b == 0)
            {
                return a;
            }
            else
            {
                return gcd(b, a % b);
            }
        }

        static int[] mark;
        static Dictionary<int, List<int>> d = new Dictionary<int, List<int>>();
        static void dfs(int v)
        {
            mark[v] = 1;
            for (int i = 0; i < d[v].Count; i++)
            {
                if (mark[d[v][i]] == 0)
                {
                    dfs(d[v][i]);
                }
            }
        }
        static void Main(string[] args)
        {
            long ans = 0;
            string[] ss = Console.ReadLine().Split();
            int n = int.Parse(ss[0]);
            string[] s = Console.ReadLine().Split();
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = int.Parse(s[i]);
            }
            Array.Sort(a);
            for (int i = n - 1; i >= 0; i--)
            {
                for (int e = i - 1; e >= 0; e--)
                {
                    if (a[e] >= a[i])
                    {
                        a[e] = Math.Max(0, a[i] - 1);
                    }
                }
            }
            for (int i = 0; i < n; i++)
            {
                ans += a[i];
            }
            Console.WriteLine(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces0710B
{
    class Program
    {

        static bool isprime(long a)
        {

            for(long i = 2;i<=Math.Sqrt(a);i++)
            {
                if (a % i == 0)
                    return false;
            }

            return true;
        }
        static void Main(string[] args)
        {

            int testCases;
            testCases = int.Parse(Console.ReadLine());

            while (testCases-- > 0)
            {

                string read;
                read = Console.ReadLine();
                long a = long.Parse(read.Split(' ').ToList()[0]);
                long b = long.Parse(read.Split(' ').ToList()[1]);

                bool flag = true;

                if (a % 2 == 1 && b % 2 == 1)
                {
                    flag = false;
                }

                if (a % 2 == 0 && b % 2 == 0)
                {
                    flag = false;
                }

                if (a - b > 1)
                {
                    flag = false;
                }

                if(flag)
                {
                    flag = isprime(a + b);
                }

                if(flag)
                {
                    Console.WriteLine("YES");
                }
                else
                {
                    Console.WriteLine("NO");
                }

            }
        }
    }
}


using System;

namespace ConsoleApplication1
{
    class Program
    {
        public static long Rec(long ss, long i, long s, long l, long r, long x, long n, long[] mas, long k)
        {
            s += mas[i];
            if ((s <= r) && (s >= l) && ((mas[i] - mas[k]) >= x))
            {
                ss++;
            }
            if (s < r)
            {
                for (long j = i + 1; j < n; j++)
                {
                    ss = Rec(ss, j, s, l, r, x, n, mas, k);
                }
            }
            return ss;
        }
        static void Main(string[] args)
        {
            long n, l, r, x;

            string[] lines = Console.ReadLine().Split(' ');
            n = long.Parse(lines[0]);
            l = long.Parse(lines[1]);
            r = long.Parse(lines[2]);
            x = long.Parse(lines[3]);
            long[] mas;
            mas = new long[n];
            string[] lines1 = Console.ReadLine().Split(' ');
            for (long i = 0; i < n; i++)
                mas[i] = long.Parse(lines1[i]);

            for (long i = 0; i < mas.Length; i++)
            {
                for (long j = 0; j < mas.Length - 1; j++)
                {
                    if (mas[j] > mas[j + 1])
                    {
                        long z = mas[j];
                        mas[j] = mas[j + 1];
                        mas[j + 1] = z;
                    }
                }
            }
            long s = 0, ss = 0, sl = 0;
            for (long jj = 0; jj < (n - 1); jj++)
            {
                sl = Rec(0, jj, s, l, r, x, n, mas, jj);
                ss += sl;
            }
            Console.WriteLine(ss);
            //  Console.ReadLine();
        }

    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        int n = ReadInt();

        var a = new bool[n, n];
        for (int m = ReadInt(); m > 0; m--)
        {
            int u = ReadInt() - 1;
            int v = ReadInt() - 1;
            a[u, v] = a[v, u] = true;
        }

        var g = Init<List<int>>(n);
        for (int i = 0; i < n; i++)
            for (int j = 0; j < n; j++)
                if (i != j && !a[i, j])
                    g[i].Add(j);

        var ans = new char[n];
        bool f = false;
        for (int i = 0; i < n; i++)
            if (ans[i] == 0)
            {
                if (g[i].Count == 0)
                {
                    ans[i] = 'b';
                    continue;
                }
                if (f)
                {
                    Write("No");
                    return;
                }
                f = true;
                var q = new Queue<int>();
                q.Enqueue(i);
                ans[i] = 'a';
                while (q.Count > 0)
                {
                    int x = q.Dequeue();
                    foreach (int e in g[x])
                        if (ans[e] != 0)
                        {
                            if (ans[e] == ans[x])
                            {
                                Write("No");
                                return;
                            }
                        }
                        else
                        {
                            ans[e] = ans[x] == 'a' ? 'c' : 'a';
                            q.Enqueue(e);
                        }
                }
            }

        for (int i = 0; i < n; i++)
            for (int j = i + 1; j < n; j++)
                if ((ans[i] == 'a' && ans[j] == 'c' || ans[i] == 'c' && ans[j] == 'a') && a[i, j])
                {
                    Write("No");
                    return;
                }

        Write("Yes");
        Write(new string(ans));
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
            new Solver().Solve();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Program
    {
        static Stack<bool> GetBinaryNumber(long number)
        {
            Stack<bool> result = new Stack<bool>();
            while (number != 0)
            {
                result.Push(number % 2 == 1);
                number /= 2;
            }
            return result;
        }
        static long FastDegree(long number, long pow)
        {
            long result = 1;
            Stack<bool> StackPow = GetBinaryNumber(pow);
            while (StackPow.Count != 0)
            {
                result *= result;
                result %= (int)(1e9 + 7);
                if (StackPow.Pop())
                {
                    result *= number;
                    result %= (int)(1e9 + 7);
                }
            }
            return result;
        }

        static int GetCountOne(int number)
        {
            int result = 0;
            while (number != 0)
            {
                if ((number & 1) == 1)
                    result++;
                number /= 2;
            }
            return result;
        }
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int n = int.Parse(str[0]);
            int m = int.Parse(str[1]);
            if (n < 7)
            {
                Console.WriteLine(m);
            }
            else
            {
                List<HashSet<int>> G = new List<HashSet<int>>();
                for (int i = 0; i < 7; i++)
                {
                    G.Add(new HashSet<int>());
                }
                int temp = m;
                while(temp-- !=0)
                {
                    str = Console.ReadLine().Split();
                    int first = int.Parse(str[0]) - 1;
                    int second = int.Parse(str[1]) - 1;
                    G[first].Add(second);
                    G[second].Add(first);
                }
                int min = 6;
                for(int i =0; i<n; i++)
                {
                    for(int j = i; j<n; j++)
                    {
                        int count = 0;
                        foreach(int top in G[j])
                        {
                            if (G[i].Contains(top))
                                count++;
                        }
                        if (count < min)
                            min = count;
                    }
                }
                Console.WriteLine(m - min);
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Friends
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = int.Parse(Console.ReadLine());

            int[] aux = new int[6];

            for(int i = 0 ; i < m ; ++i )
            {
                string[] ab = Console.ReadLine().Split(' ');
                int a = int.Parse(ab[0]);
                int b = int.Parse(ab[1]);

                aux[a]++;
                aux[b]++;
            }

            bool f = false;

            for(int i = 1 ; i < 6 ; ++i )
            {
                if(aux[i] >= 3 || aux[i] <= 1)
                {
                        f = true;
                        break;
                }
            }

            if(f)
            {
                Console.WriteLine("WIN");
            }
            else
            {
                Console.WriteLine("FAIL");
            }
        }
    }
}


using System;

namespace TaskB {
    internal class Program {
        private static void Main(string[] args) {
            int n = int.Parse(Console.ReadLine());
            Console.WriteLine(2 * n / 4 * 3);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1.Combynatorycs
{
    class _776
    {
        static void Main(String[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var data1 = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
            var data2 = Console.ReadLine().Split(' ').Select(int.Parse).ToList();

            var res1 = new int[6];
            var res2 = new int[6];

            for(var i = 0; i < data1.Count; i++)
            {
                res1[data1[i]]++;
                res2[data2[i]]++;
            }

            var result = 0;
            for(var i = 1; i <= 5; i++)
            {
                var c = res1[i] + res2[i];
                if (c % 2 != 0)
                {
                    Console.WriteLine(-1);
                    return;
                }
                result += Math.Abs(res1[i] - res2[i]) / 2;
            }

            if (result % 2 != 0)
            {
                Console.WriteLine(-1);
                return;
            }

            Console.WriteLine(result/2);

        }
    }
}


using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
// Powered by caide (code generator, tester, and library code inliner)

class Solution {
    public void solve(TextReader input, TextWriter output) {
        string s1 = input.ReadLine();
        string s2 = input.ReadLine();
        int index = 0;
        foreach(char c in s2)
        {
            if(c == s1[index])
            {
                index++;
            }
        }
        output.Write(index + 1);
    }
}

class CaideConstants {
    public const string InputFile = null;
    public const string OutputFile = null;
}
public class Program {
    public static void Main(string[] args) {
        Solution solution = new Solution();
        using (System.IO.TextReader input =
                CaideConstants.InputFile == null ? System.Console.In :
                        new System.IO.StreamReader(CaideConstants.InputFile))
        using (System.IO.TextWriter output =
                CaideConstants.OutputFile == null ? System.Console.Out:
                        new System.IO.StreamWriter(CaideConstants.OutputFile))

            solution.solve(input, output);
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace A.Theatre_Square
{
    class Program
    {
        static int sq2(int k)
        {
            return (1 << k) - 1;
        }

        static void Main(string[] args)
        {
            string[] data = Console.ReadLine().Trim().Split(' ');
            int n = Int32.Parse(data[0]);
            int h = Int32.Parse(data[1]);
            Int64[,] f=new Int64[36,36];
            f[0, 0] = 1;
            f[1, 1] = 1;
            for (int i = 2; i <= n; i++)
            {
                for (int j = i; j <= n; j++)
                {
                    for (int k = 0; k <= j - 1; k++)
                    {
                        for (int l = (int)Math.Ceiling(Math.Log(k + 1, 2)); l <= k; l++)
                        {
                            for (int r = (int)Math.Ceiling(Math.Log(j - k, 2)); r <= j - k - 1; r++)
                            {
                                if((l==i-1 || r==i-1)&&(l<i && r<i))
                                    f[i, j] += f[l, k] * f[r, j - k - 1];
                            }
                        }
                    }
                }
            }
            Int64 result = 0;
            for (int i = h; i <= n; i++)
            {
                result += f[i, n];
            }
            Console.WriteLine(result);
            Console.ReadKey();
        }
    }

}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace Codeforces_249_2
{
    class Program
    {
        static string solve(string s, int k)
        {
            if (k < 1 || s.Length < 2) return s;
            int m = 0;
            for (int i = 1; i < s.Length && i <= k; ++i)
                if (s[m] < s[i]) m = i;
            return s[m] + solve(s.Substring(0, m) + s.Substring(m + 1), k - m);
        }
        static void Main(string[] args)
        {
            string[] S = Console.ReadLine().Split(' ');
            Console.WriteLine( solve( S[0], int.Parse(S[1]) ) );
        }
    }
}


using System;
using System.IO;

class CFB
{
    static int a, b;
    static string d, aA;
    static void DocThongSo()
    {
        string S = Console.ReadLine();
        //a.deb
        string[] M = S.Split(new char[] { '.' });
        string[] E = M[1].Split(new char[] { 'e' });
        a = int.Parse(M[0]);
        aA = M[0];
        b = int.Parse(E[1]);
        d = E[0];
    }
    static void Main(string[] agrs)
    {
        DocThongSo();
        string kq = aA;
        if (b > 0 && b<d.Length)
        {
            for (int i = 0; i < b; i++)
            {
                kq = kq + d[i];
            }
            kq = kq + ".";
            for (int i = b; i < d.Length; i++)
            {
                kq = kq + d[i];
            }
        }
        else if (b == 0 && d != "0")
        {
            kq = kq + "." + d;
        }
        else if(b==d.Length)
        {
            kq = kq + d;
        }
        else if (b > d.Length)
        {
            int L = b-d.Length;
            kq = kq + d;
            for (int i = 1; i <= L; i++)
            {
                kq = kq + "0";
            }
        }
        else if (a == b && a == 0)
        {
            kq = "0";
        }
        Console.WriteLine(kq);
    }
}


using System;

class Program {
	public static void Main() {
#if DVORAK
		Console.SetIn(new System.IO.StreamReader("..\\..\\in.txt"));
#endif
		String[] mon = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };

		Console.WriteLine(mon[(Array.IndexOf(mon, Console.ReadLine()) + Int32.Parse(Console.ReadLine())) % mon.Length]);
	}
}


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;

namespace Codeforces
{
	internal class Template
	{
		private Dictionary<Tuple<long, long, long>, long> dp;

		private void Solve()
		{
			dp = new Dictionary<Tuple<long, long, long>, long>();

			var n = cin.NextLong();
			var l = cin.NextLong();
			var r = cin.NextLong();

			if (n == 0)
			{
				Console.WriteLine(0);
				return;
			}

			var count = Count(n, l-1, r-1);
			Console.WriteLine(count);
		}

		private long Count(long n, long l, long r)
		{
			if (n == 1)
			{
				return 1;
			}

			if (dp.ContainsKey(Tuple.Create(n, l, r)))
			{
				return dp[Tuple.Create(n, l, r)];
			}

			var idx = 0;
			var nn = n;
			while (nn > 1)
			{
				idx++;
				nn/=2;
			}
			var len = 1L;
			for (var i = 0; i < idx; i++)
			{
				len *= 2;
				len++;
			}
			var middle = len/2;
			var sum = 0L;
			if (l <= middle && r >= middle)
			{
				sum += n%2;
				if (l < middle)
				{
					sum += Count(n/2, l, middle - 1);
				}
				if (r > middle)
				{
					sum += Count(n/2, 0, r - middle - 1);
				}
			}
			else if (l < middle)
			{
				sum += Count(n/2, l, r);
			}
			else
			{
				sum += Count(n/2, l - middle - 1, r - middle - 1);
			}
			dp[Tuple.Create(n, l, r)] = sum;
			return sum;
		}

		private static readonly Scanner cin = new Scanner();

		private static void Main()
		{
#if DEBUG
			var inputText = File.ReadAllText(@"..\..\input.txt");
			var testCases = inputText.Split(new[] { "input" }, StringSplitOptions.RemoveEmptyEntries);
			var consoleOut = Console.Out;
			for (var i = 0; i < testCases.Length; i++)
			{
				var parts = testCases[i].Split(new[] { "output" }, StringSplitOptions.RemoveEmptyEntries);
				Console.SetIn(new StringReader(parts[0].Trim()));
				var stringWriter = new StringWriter();
				Console.SetOut(stringWriter);
				var sw = Stopwatch.StartNew();
				new Template().Solve();
				sw.Stop();
				var output = stringWriter.ToString();

				Console.SetOut(consoleOut);
				var color = ConsoleColor.Green;
				var status = "Passed";
				if (parts[1].Trim() != output.Trim())
				{
					color = ConsoleColor.Red;
					status = "Failed";
				}
				Console.ForegroundColor = color;
				Console.WriteLine("Test {0} {1} in {2}ms", i + 1, status, sw.ElapsedMilliseconds);
			}
			Console.ReadLine();
			Console.ReadKey();
#else
			new Template().Solve();
			Console.ReadLine();
#endif
		}
	}

	internal class Scanner
	{
		private string[] s = new string[0];
		private int i;
		private readonly char[] cs = { ' ' };

		public string NextString()
		{
			if (i < s.Length) return s[i++];
			var line = Console.ReadLine() ?? string.Empty;
			s = line.Split(cs, StringSplitOptions.RemoveEmptyEntries);
			i = 1;
			return s.First();
		}

		public double NextDouble()
		{
			return double.Parse(NextString());
		}

		public int NextInt()
		{
			return int.Parse(NextString());
		}

		public long NextLong()
		{
			return long.Parse(NextString());
		}
	}
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RocketB
{
    class Program
    {

        private class Bid
        {
            public int Index;
            public bool Left;
            public int Value;
            public double[] WinRate;
        }

        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int n = 0;
            int.TryParse(str, out n);

            var R = new int[n];
            var L = new int[n];
            int min = 100000;
            int max = 0;
            for(int i = 0; i < n; i++)
            {
                str = Console.ReadLine();
                var strs = str.Split(' ');
                int l = 0;
                int r = 0;
                int.TryParse(strs[0], out l);
                int.TryParse(strs[1], out r);
                L[i] = l;
                R[i] = r;
                if(l < min) min = l;
                if(r > max) max = r;
            }

            double expected = 0d;

            //var debug = new double[max + 1];
            //double weightSum =0;
            for (int price = min; price <= max; price++)
            {

                double weight = 0;
                double exactlyOne = 0;
                double less = 1d;
                double notMore = 1d;
                for(int i =0; i < n; i++)
                {
                    var ri = R[i];
                    var li = L[i];
                    var di = ri - li + 1;
                    double imoreprob;
                    double iNotMoreProb;
                    double here = 0d;
                    if(li > price)
                    {
                        less = 0;
                        notMore = 0;
                        imoreprob = 1;
                        iNotMoreProb = 0;
                    }
                    else
                        if(ri < price)
                        {
                            imoreprob = 0;
                            iNotMoreProb = 1;
                            //less *= 1;
                            //notMore *= 1;
                            continue;
                        }
                        else
                        {
                            imoreprob = (ri - price) / (double)di;
                            notMore *=  (price - li + 1) / (double)di;
                            less *= (price - li)  / (double)di;
                            here = 1 / (double)di;
                        }

                    double allNotMore = 1d;
                    double allLess = 1d;

                    for(int j =0; j <n; j++)
                    {
                        if (j == i) continue;
                        var rj = R[j];
                        var lj = L[j];
                        var dj = rj - lj + 1;

                        if(lj > price)
                        {
                            allNotMore = allLess = 0;
                        }
                        else
                        if(rj < price)
                        {
                            //allNotMore *=1 ; allLess *= 1;
                        }
                        else
                        {
                            allNotMore *= (price - lj + 1) /(double)dj;
                            allLess *= (price - lj) / (double)dj;
                        }
                    }

                    weight += imoreprob * (allNotMore - allLess);
                    exactlyOne += here * allLess;
                    //weight += here *
                }
                weight += (notMore - less - exactlyOne);//2 or more here
                //debug[price] = weight;
               // weightSum += weight;
                expected += price * weight;
            }

            Console.WriteLine((expected).ToString("F10", CultureInfo.InvariantCulture)); ;

        }
    }
}


using System;
using System.IO;
using System.Text;

namespace The_Wall__medium_
{
    internal class Program
    {
        private const int mod = 1000003;
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static long[] fact;
        private static long[] fact1;

        private static void Main(string[] args)
        {
            int n = Next();
            int c = Next();

            InitFact(n + c + 1);
            long ans = (GetCFact(n + c, c) - 1 + mod)%mod;

            writer.WriteLine(ans);
            writer.Flush();
        }

        private static void InitFact(int n)
        {
            fact = new long[n];
            fact1 = new long[n];

            fact[0] = 1;

            for (int i = 1; i < fact.Length; i++)
            {
                fact[i] = (fact[i - 1]*i)%mod;
            }
            fact1[n - 1] = Pow(fact[n - 1], mod - 2);
            for (int i = fact1.Length - 2; i >= 0; i--)
            {
                fact1[i] = (fact1[i + 1]*(i + 1))%mod;
            }
        }

        private static long Pow(long a, int k)
        {
            long r = 1;
            while (k > 0)
            {
                if ((k & 1) == 1)
                {
                    r = (r*a)%mod;
                }
                a = (a*a)%mod;
                k >>= 1;
            }
            return r;
        }

        private static long GetCFact(int n, int k)
        {
            return (((fact[n]*fact1[k])%mod)*fact1[n - k])%mod;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Text;

namespace codeforces
{
	class Program
	{
		public class User
		{
			public int c;

			public int r;
		}

		public class Point
		{
			public int x;

			public double p;
		}

		public class Comparer : IComparer<User>
		{
			public int Compare(User x, User y)
			{
				if (x.c < y.c || (x.c == y.c && x.r < y.r))
					return -1;
				return 1;
			}
		}

		public static long getGcd(long a, long b)
		{
			if (b == 0)
				return a;
			return getGcd(b, a % b);
		}

		public static void WriteYESNO(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string GetString()
		{
			return Console.ReadLine();
		}

		public static List<int> getList()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static int Min(int x, int y)
		{
			return Math.Min(x, y);
		}

		public static int Max(int x, int y)
		{
			return Math.Max(x, y);
		}

		public static int Abs(int x)
		{
			return Math.Abs(x);
		}

		public static int getInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static bool Equal(int x, int y, int x1, int y1)
		{
			return x == x1 && y == y1;
		}

		public class Vertex
		{
			public List<int> edges;

			public int ct;

			public Vertex()
			{
				ct = 0;
				edges = new List<int>();
				for (var i = 0; i < 26; ++i)
					edges.Add(0);
			}
		}

		private static void Main(string[] args)
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/

			var n = getInt();
			var s1 = 0;
			var s2 = 0;
			var p = false;
			for (var i = 0; i < n; ++i)
			{
				var l = getList();
				s1 += l[0];
				s2 += l[1];
				if (l[0]%2 != l[1]%2)
					p = true;
			}
			if (s1%2 == s2%2)
			{
				if (s1 % 2 == 0)
					Console.WriteLine(0);
				else
				{
					if (p)
						Console.WriteLine(1);
					else
					{
						Console.WriteLine(-1);
					}
				}
			}
			else
			{
				Console.WriteLine(-1);
			}
			/*			input.Close();
			output.Close();*/
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace P409A
{
    class Program
    {
        static int[] convert(string action)
        {
            int[] list = new int[action.Length / 2];

            for (int i = 0; i < action.Length/2; i++)
            {
                string str = action.Substring(i*2, 2);

                int simbol = 0;

                switch (str)
                {
                    case "[]":
                        simbol = 1;
                        break;
                    case "()":
                        simbol = 0;
                        break;
                    case "8<":
                        simbol = 2;
                        break;
                }

                list[i] = simbol;
            }

            return list;
        }

        static int Compare(int x, int y)
        {
            if (x == y)
                return 0;

            if (x == 2 && y == 0)
                return -1;

            if (y == 2 && x == 0)
                return 1;

            if (x > y)
                return 1;

            else
                return -1;

        }

        static void Main(string[] args)
        {
            string action1 = Console.ReadLine();
            string action2 = Console.ReadLine();

            int[] list1 = convert(action1);
            int[] list2 = convert(action2);

            int compare = 0;

            for (int i = 0; i < list1.Length; i++)
            {
                compare += Compare(list1[i], list2[i]);
            }

            if (compare == 0)
                Console.WriteLine("TIE");
            else if (compare > 0)
                Console.WriteLine("TEAM 1 WINS");
            else
                Console.WriteLine("TEAM 2 WINS");
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProgrammingContest.Codeforces.Round91 {
    class C {
        static List<int> num = new List<int>();
        static void gen(long x, int n) {
            if (x <= n) {
                if(x != 0)
                    num.Add((int)x);
                gen(x * 10 + 4, n);
                gen(x * 10 + 7, n);
            }
        }

        static long fact(long n) { long res = 1; while (n > 1) res *= n--; return res; }

        static int n;
        static List<int> val = new List<int>();
        static int dfs(int pos, long k) {
            if (pos > n) return 0;
            int rest = n - pos,
                res = 0;
            for (int i = 0; i < val.Count; i++) {
                if (val[i] == -1) continue;
                if (k < fact(rest)) {
                    if (num.Contains(val[i]) && num.Contains(pos)) {
                        res = 1;
                    }
                    //Console.WriteLine("dfs: {0} {1}", pos, val[i]);
                    val[i] = -1;
                    return res + dfs(pos + 1, k);
                }
                k -= fact(rest);
            }
            throw new Exception();
        }

        static void Main() {
            var xs = Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), int.Parse);
            n = xs[0];
            int k = xs[1]-1;

            for (int v = k, i = 1; i <= n && v != 0; i++) {
                v /= i;
                if (i == n && v != 0) {
                    Console.WriteLine(-1);
                    return;
                }
            }

            gen(0, n);
            num.Sort();
            for (long v = 1, i = 1; i <= n; i++) {
                v *= i;
                if (k < v) {
                    int res = 0;
                    int m = (int)(n - i);
                    int id = -1;
                    //Console.WriteLine("dfs: {0} {1}", m, res);
                    for (int j = 0; j < num.Count; j++) {
                        if (num[j] > m) {
                            res += j;
                            id = j;
                            break;
                        }
                        if (j == num.Count - 1) {
                            Console.WriteLine(num.Count);
                            return;
                        }
                    }
                    //Console.WriteLine("dfs: {0} {1}", m, res);
                    for (int j = m; j < n; j++) {
                        val.Add(j + 1);
                    }
                    Console.WriteLine(dfs(m+1, k) + res);
                    return;
                }
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coding
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] integersInput = Console.ReadLine().Split();

            int n = int.Parse(integersInput[0]);
            int m = int.Parse(integersInput[1]);
            int k = int.Parse(integersInput[2]);

            if (n - m <= 0 && n - k <= 0)
            {
                Console.WriteLine("Yes");
            } else
            {
                Console.WriteLine("No");
            }
        }
    }
}


using System;

namespace CSCA
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string[] scan = new string[2];
            int n, k, timeLimit;
            scan = Console.ReadLine().Split(' ');
            n = Convert.ToInt32(scan[0]);
            k = Convert.ToInt32(scan[1]);
            timeLimit = 240 - k;
            int time = 0, ans = 0;
            for (int i = 1; i <= n; i++)
            {
                if (time + i * 5 <= timeLimit)
                {
                    time += i * 5;
                    ans++;
                }
                else break;
            }
            Console.WriteLine(ans);
            return;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    const int MOD = 1000000007;

    public void Solve()
    {
        for (int tt = ReadInt(); tt > 0; tt--)
        {
            int n = ReadInt();
            int m = ReadInt();

            long ans = 1;
            for (int i = 0; i < m; i++)
                ans = ans * n % MOD;

            Write(ans);
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;
using CompLib.Util;

public class Program
{
    int N;
    long M;
    long[] A;
    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
        M = sc.NextInt();
        A = sc.LongArray();

        /*
         * Aからいくつか選んで Mod Mが最大になるようにする
         */

        var left = Calc(0, N / 2);
        var right = Calc(N / 2, N);
        long ans = ((left.Last() + right.Last()) % M);
        foreach (int i in left)
        {
            // i + right[j] がM未満最大
            //
            int ok = 0;
            int ng = right.Count;
            while(ng - ok > 1)
            {
                int mid = (ok + ng) / 2;
                if (i + right[mid] < M) ok = mid;
                else ng = mid;
            }
            ans = Math.Max(ans, i + right[ok]);
        }

        Console.WriteLine(ans);
    }

    List<long> Calc(int b, int e)
    {
        var ls = new List<long>();
        ls.Add(0);

        for (int i = b; i < e; i++)
        {
            int len = ls.Count;
            for (int j = 0; j < len; j++)
            {
                ls.Add((ls[j] + A[i]) % M);
            }
        }

        var result = new List<long>();
        ls.Sort();
        for (int i = 0; i < ls.Count; i++)
        {
            if (i == 0 || ls[i - 1] != ls[i])
            {
                result.Add(ls[i]);
            }
        }

        return result;
    }

    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public string ReadLine()
        {
            _index = _line.Length;
            return Console.ReadLine();
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Globalization;

#if DEBUG
using System.Diagnostics;
#endif

namespace CompetitiveProgramming
{
    class Program
    {
        static bool s_IsMultipleTestCases = false;
        static void Main(string[] args)
        {
#if DEBUG
            s_IsMultipleTestCases = true;
            var streamReader = new StreamReader("../../input.txt", Encoding.ASCII, false, 32768);
            var streamWriter = new StreamWriter("../../output.txt", false, Encoding.ASCII, 32768);
            var timer = new Stopwatch();
#else
            var streamReader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            var streamWriter = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
#endif
            var reader = new InputReader(streamReader);

            var numberOfTest = 1;
            if (s_IsMultipleTestCases)
            {
                numberOfTest = reader.NextInt();
            }
            for (var testNumber = 1; testNumber <= numberOfTest; ++testNumber)
            {
#if DEBUG
                timer.Start();
#endif
                Task solver = new Task();
                solver.Solve(testNumber, reader, streamWriter);
#if DEBUG
                streamWriter.WriteLine("Eslapsed Time: " + timer.ElapsedMilliseconds + " ms\n");
                timer.Reset();
#endif
            }
            streamReader.Close();
            streamWriter.Close();
        }
    }

    class Task
    {
        const long MOD = 1000000007;
        const int MAXN = 20002;
        long ans = 0;
        string res = "NO";
        long BASE = 31;

        public void Solve(int testNumber, InputReader reader, StreamWriter writer)
        {
            var n = reader.NextInt();
            var c = reader.NextInt();
            var p = reader.NIS(n);
            var t = reader.NIS(n);
            var limark = 0;
            var radewoosh = 0;
            var x = 0;
            for (int i = 0; i < n; i++)
            {
                x += t[i];
                limark += Max(0, p[i] - c * x);
            }

            x = 0;
            for (int i = n - 1; i >= 0; i--)
            {
                x += t[i];
                radewoosh += Max(0, p[i] - c * x);
            }

            if(limark == radewoosh)
            {
                res = "Tie";
            }else if(limark > radewoosh)
            {
                res = "Limak";
            }
            else
            {
                res = "Radewoosh";
            }
            writer.WriteLine(res);
        }

        #region Utilities
        private string ConvertArrayToString(int[] arrs)
        {
            var sb = new StringBuilder();
            foreach (var item in arrs)
            {
                sb.Append(item);
                sb.Append("\n");
            }
            return sb.ToString();
        }

        private string ConvertArrayToString(long[] arrs)
        {
            var sb = new StringBuilder();
            foreach (var item in arrs)
            {
                sb.Append(item);
                sb.Append("\n");
            }
            return sb.ToString();
        }

        private string ConvertDoubleToString(double x)
        {
            return x.ToString(CultureInfo.InvariantCulture);
        }

        private int Max(int a, int b)
        {
            return Math.Max(a, b);
        }

        private int Min(int a, int b)
        {
            return Math.Min(a, b);
        }

        private long Max(long a, long b)
        {
            return Math.Max(a, b);
        }

        private long Min(long a, long b)
        {
            return Math.Min(a, b);
        }

        private long GCD(long a, long b)
        {
            return a > 0 ? b : GCD(b, a % b);
        }

        private int GCD(int a, int b)
        {
            return a > 0 ? b : GCD(b, a % b);
        }

        #endregion
    }

    class InputReader
    {
        private char[] _inbuf;
        private int _lenbuf = 0, _ptrbuf = 0;
        private StreamReader _reader;

        public InputReader(StreamReader reader)
        {
            _reader = reader;
            _inbuf = new char[1024];
            _lenbuf = 0;
            _ptrbuf = 0;
        }

        private int ReadByte()
        {
            if (_lenbuf == -1)
                throw new Exception();
            if (_ptrbuf >= _lenbuf)
            {
                _ptrbuf = 0;
                try
                {
                    _lenbuf = _reader.Read(_inbuf, 0, 1024);
                }
                catch (IOException e)
                {
                    throw e;
                }
                if (_lenbuf <= 0)
                    return -1;
            }
            return _inbuf[_ptrbuf++];
        }

        private bool IsSpaceChar(int c)
        {
            return !(c >= 33 && c <= 126);
        }

        private int Skip()
        {
            int b;
            while ((b = ReadByte()) != -1 && IsSpaceChar(b)) ;
            return b;
        }

        public int NextInt()
        {
            int num = 0, b;
            var minus = false;
            while ((b = ReadByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-')
            {
                minus = true;
                b = ReadByte();
            }

            while (true)
            {
                if (b >= '0' && b <= '9')
                {
                    num = num * 10 + (b - '0');
                }
                else
                {
                    return minus ? -num : num;
                }
                b = ReadByte();
            }
        }

        public long NextLong()
        {
            long num = 0, b;
            var minus = false;
            while ((b = ReadByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-')
            {
                minus = true;
                b = ReadByte();
            }

            while (true)
            {
                if (b >= '0' && b <= '9')
                {
                    num = num * 10 + (b - '0');
                }
                else
                {
                    return minus ? -num : num;
                }
                b = ReadByte();
            }
        }

        public string Next()
        {
            var b = Skip();
            var sb = new StringBuilder();
            while (!(IsSpaceChar(b)))
            {
                sb.Append((char)b);
                b = ReadByte();
            }
            return sb.ToString();
        }

        public double NextDouble()
        {
            return double.Parse(Next(), CultureInfo.InvariantCulture);
        }

        public int[] NIS(int n)
        {
            var arrs = new int[n];
            for (int i = 0; i < n; i++)
            {
                arrs[i] = NextInt();
            }
            return arrs;
        }

        public long[] NLS(int n)
        {
            var arrs = new long[n];
            for (int i = 0; i < n; i++)
            {
                arrs[i] = NextLong();
            }
            return arrs;
        }
    }

}