using System;

class Solution
{
    static void Main()
    {
        var count = 0;
        var input = Console.ReadLine();
        var friends = new string[] {"Danil", "Olya", "Slava", "Ann", "Nikita"};
        foreach (var friend in friends)
            if (input.Contains(friend))
                count++;
        Console.WriteLine((count == 1) ? "YES" : "NO");
    }
}


//Template by _Trung_Nguyen
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System.IO;

using Libraries;
using Libraries.IO;
using Libraries.Collections;

namespace Codeforces
{
	public class sample
	{
		private static int [] convertBase(int a, int numberBase)
		{
			Deque<int> result = new Deque<int>();
			while (a > 0)
			{
				result.AddFirst(a % numberBase);
				a /= numberBase;
			}
			return result.ToArray();
		}
		private static int solution()
		{
			int w = cin.ReadInt32();
			int m = cin.ReadInt32();

			int [] a = convertBase(m, w);

			for (int i = a.Length - 1; i >= 0; --i)
			{
				if ((a[i] == 0) || (a[i] == 1)) continue;
				a[i] -= w;
				if (a[i] > 0) ++a[i - 1];
				if (a[i] != -1)
				{
					cout.Write("NO");
					return 0;
				}
			}

			cout.Write("YES");

			return 0;
		}

//===============Prewritten code======================
		private static istream cin = new istream(Console.OpenStandardInput());
		private static ostream cout = new ostream(Console.OpenStandardOutput());
		private static ostream cerr = new ostream(Console.OpenStandardError());
		private static ostream clog = new ostream(Console.OpenStandardError(), true);

		public static int Main()
		{
			try
			{
				int returnValue = solution();
				cout.Flush();
				cerr.Flush();
				return returnValue;
			}
			catch (Exception e)
			{
				Console.WriteLine(e.ToString());
				return -1;
			}
		}
	}
}

namespace Libraries.IO
{
	public class istream : IDisposable
	{
		private BufferedStream buffer;
		private StreamReader reader;
		private Queue<string> words = new Queue<string>();
		private void getWords()
		{
			while (words.Count == 0)
			{
				string [] temp = reader.ReadLine().Split();
				foreach (var str in temp)
				{
					if (str.Length == 0) continue;
					words.Enqueue(str);
				}
			}
		}
		public istream(Stream istr)
		{
			buffer = new BufferedStream(istr);
			reader = new StreamReader(buffer);
		}
		public int Peek()
		{
			return reader.Peek();
		}
		public int Read()
		{
			return reader.Read();
		}
		public string ReadLine()
		{
			return reader.ReadLine();
		}
		public int [] ReadInt32Array()
		{
			return reader.ReadLine().Split().Select(x => Convert.ToInt32(x)).ToArray();
		}
		public long [] ReadInt64Array()
		{
			return reader.ReadLine().Split().Select(x => Convert.ToInt64(x)).ToArray();
		}
		public string [] ReadStringArray()
		{
			return reader.ReadLine().Split();
		}
		public int ReadInt32()
		{
			getWords();
			return Convert.ToInt32(words.Dequeue());
		}
		public long ReadInt64()
		{
			getWords();
			return Convert.ToInt64(words.Dequeue());
		}
		public string ReadString()
		{
			getWords();
			return words.Dequeue();
		}
		public void Dispose()
		{
			reader.Dispose();
			buffer.Dispose();
		}
	}
	public class ostream : IDisposable
	{
		private BufferedStream buffer;
		private StreamWriter writer;
		public ostream(Stream ostr, bool autoflush = false)
		{
			buffer = new BufferedStream(ostr);
			writer = new StreamWriter(buffer);
			writer.AutoFlush = autoflush;
		}
		public void Write(string format, params object[] args)
		{
			writer.Write(format, args);
		}
		public void Write<T>(T value)
		{
			writer.Write(value);
		}
		public void Write<T>(T [] arr, string sep)
		{
			string fmt = "{0}" + sep;
			foreach (var x in arr) writer.Write(fmt, x);
		}
		public void WriteLine(string format, params object[] args)
		{
			writer.WriteLine(format, args);
		}
		public void WriteLine<T>(T value)
		{
			writer.WriteLine(value);
		}
		public void WriteLine<T>(IEnumerable<T> arr, string sep)
		{
			string fmt = "{0}" + sep;
			foreach (var x in arr) writer.Write(fmt, x);
			writer.WriteLine();
		}
		public void WriteLine<T>(IEnumerable<T> arr, string sep, Func<T, T> funct)
		{
			string fmt = "{0}" + sep;
			foreach (var x in arr) writer.Write(fmt, funct(x));
			writer.WriteLine();
		}
		public void WriteLine()
		{
			writer.WriteLine();
		}
		public void Flush()
		{
			writer.Flush();
		}
		public void Dispose()
		{
			writer.Dispose();
			buffer.Dispose();
		}
	}
}
namespace Libraries
{
	public class Utilities
	{
		public static void Swap<T>(ref T x, ref T y)
		{
			T temp = y;
			y = x;
			x = temp;
		}
	}

	public static class Arrays
	{
		private static T Inc<T>(ref T value)
		{
			dynamic temp = value;
			dynamic temp2 = temp;
			value = ++temp2;
			return temp++;
		}
		public static IEnumerable<T> FillDefault<T>(int size) where T : new()
		{
			for (int i = 0; i < size; ++i) yield return new T();
		}
		public static IEnumerable<T> Fill<T>(int size, T value)
		{
			for (int i = 0; i < size; ++i) yield return value;
		}
		public static IEnumerable<T> Fill<T>(int size, Func<T> funct)
		{
			for (int i = 0; i < size; ++i) yield return funct();
		}
		public static IEnumerable<T> Iota<T>(int size, T init)
		{
			for (int i = 0; i < size; ++i) yield return Inc(ref init);
		}
		public static T First<T> (this IList<T> container)
		{
			if (container.Count == 0) throw new InvalidOperationException("The container is empty");
			return container[0];
		}
		public static T Last<T> (this IList<T> container)
		{
			if (container.Count == 0) throw new InvalidOperationException("The container is empty");
			return container[container.Count - 1];
		}
		public static void RemoveLast<T> (this IList<T> container)
		{
			if (container.Count == 0) throw new InvalidOperationException("The container is empty");
			container.RemoveAt(container.Count - 1);
		}
	}
}

namespace Libraries.Collections
{
	class PriorityQueue<T> where T : IComparable
	{
	    private List<T> list;
	    public int Count { get { return list.Count; } }
	    public readonly bool IsDescending;

	    public PriorityQueue(bool isdesc = true)
	    {
	        list = new List<T>();
	        IsDescending = isdesc;
	    }

	    public PriorityQueue(int capacity, bool isdesc = true)
	    {
	        list = new List<T>(capacity);
	        IsDescending = isdesc;
	    }

	    public PriorityQueue(IEnumerable<T> collection, bool isdesc = true)
	        : this()
	    {
	        IsDescending = isdesc;
	        foreach (var item in collection)
	            Enqueue(item);
	    }

	    public void Enqueue(T x)
	    {
	        list.Add(x);
	        int i = Count - 1;

	        while (i > 0)
	        {
	            int p = (i - 1) / 2;
	            if ((IsDescending ? -1 : 1) * list[p].CompareTo(x) <= 0) break;

	            list[i] = list[p];
	            i = p;
	        }

	        if (Count > 0) list[i] = x;
	    }

	    public T Dequeue()
	    {
	        T target = Peek();
	        T root = list[Count - 1];
	        list.RemoveAt(Count - 1);

	        int i = 0;
	        while (i * 2 + 1 < Count)
	        {
	            int a = i * 2 + 1;
	            int b = i * 2 + 2;
	            int c = b < Count && (IsDescending ? -1 : 1) * list[b].CompareTo(list[a]) < 0 ? b : a;

	            if ((IsDescending ? -1 : 1) * list[c].CompareTo(root) >= 0) break;
	            list[i] = list[c];
	            i = c;
	        }

	        if (Count > 0) list[i] = root;
	        return target;
	    }

	    public T Peek()
	    {
	        if (Count == 0) throw new InvalidOperationException("Queue is empty.");
	        return list[0];
	    }

	    public void Clear()
	    {
	        list.Clear();
	    }
	}
    internal class DequeUtility
    {
        public static int ClosestPowerOfTwoGreaterThan(int x)
        {
            x--;
            x |= (x >> 1);
            x |= (x >> 2);
            x |= (x >> 4);
            x |= (x >> 8);
            x |= (x >> 16);
            return (x+1);
        }

        public static int Count<TSource>(IEnumerable<TSource> source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            ICollection<TSource> genericCollection = source as ICollection<TSource>;
            if (genericCollection != null)
            {
                return genericCollection.Count;
            }

            ICollection nonGenericCollection = source as ICollection;
            if (nonGenericCollection != null)
            {
                return nonGenericCollection.Count;
            }

            checked
            {
                int count = 0;
                using (var iterator = source.GetEnumerator())
                {
                    while (iterator.MoveNext())
                    {
                        count++;
                    }
                }
                return count;
            }
        }
    }

    public class Deque<T> : IList<T>
    {
        private const int defaultCapacity = 16;

        private int startOffset;

        private T[] buffer;

        public Deque() : this(defaultCapacity) { }

        public Deque(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentOutOfRangeException(
                    "capacity", "capacity is less than 0.");
            }

            this.Capacity = capacity;
        }

        public Deque(IEnumerable<T> collection)
            : this(DequeUtility.Count(collection))
        {
            InsertRange(0, collection);
        }

        private int capacityClosestPowerOfTwoMinusOne;

        public int Capacity
        {
            get
            {
                return buffer.Length;
            }

            set
            {
                if (value < 0)
                {
                    throw new ArgumentOutOfRangeException(
                        "value",
                        "Capacity is less than 0.");
                }
                else if (value < this.Count)
                {
                    throw new InvalidOperationException(
                        "Capacity cannot be set to a value less than Count");
                }
                else if (null != buffer && value == buffer.Length)
                {
                    return;
                }

                int powOfTwo = DequeUtility.ClosestPowerOfTwoGreaterThan(value);

                value = powOfTwo;

                T[] newBuffer = new T[value];
                this.CopyTo(newBuffer, 0);

                buffer = newBuffer;
                startOffset = 0;
                this.capacityClosestPowerOfTwoMinusOne = powOfTwo - 1;
            }
        }

        public bool IsFull
        {
            get { return this.Count == this.Capacity; }
        }

        public bool IsEmpty
        {
            get { return 0 == this.Count; }
        }

        private void ensureCapacityFor(int numElements)
        {
            if (this.Count + numElements > this.Capacity)
            {
                this.Capacity = this.Count + numElements;
            }
        }

        private int toBufferIndex(int index)
        {
            int bufferIndex;

            bufferIndex = (index + this.startOffset)
                & this.capacityClosestPowerOfTwoMinusOne;

            return bufferIndex;
        }

        private void checkIndexOutOfRange(int index)
        {
            if (index >= this.Count)
            {
                throw new IndexOutOfRangeException(
                    "The supplied index is greater than the Count");
            }
        }

        private static void checkArgumentsOutOfRange(
            int length,
            int offset,
            int count)
        {
            if (offset < 0)
            {
                throw new ArgumentOutOfRangeException(
                    "offset", "Invalid offset " + offset);
            }

            if (count < 0)
            {
                throw new ArgumentOutOfRangeException(
                    "count", "Invalid count " + count);
            }

            if (length - offset < count)
            {
                throw new ArgumentException(
                    String.Format(
                    "Invalid offset ({0}) or count + ({1}) "
                    + "for source length {2}",
                    offset, count, length));
            }
        }

        private int shiftStartOffset(int value)
        {
            this.startOffset = toBufferIndex(value);

            return this.startOffset;
        }

        private int preShiftStartOffset(int value)
        {
            int offset = this.startOffset;
            this.shiftStartOffset(value);
            return offset;
        }

        private int postShiftStartOffset(int value)
        {
            return shiftStartOffset(value);
        }

        #region IEnumerable

        public IEnumerator<T> GetEnumerator()
        {
            if (this.startOffset + this.Count > this.Capacity)
            {
                for (int i = this.startOffset; i < this.Capacity; i++)
                {
                    yield return buffer[i];
                }

                int endIndex = toBufferIndex(this.Count);
                for (int i = 0; i < endIndex; i++)
                {
                    yield return buffer[i];
                }
            }
            else
            {
                int endIndex = this.startOffset + this.Count;
                for (int i = this.startOffset; i < endIndex; i++)
                {
                    yield return buffer[i];
                }
            }
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }
        #endregion

        #region ICollection

        bool ICollection<T>.IsReadOnly
        {
            get { return false; }
        }

        public int Count
        {
            get;
            private set;
        }

        private void incrementCount(int value)
        {
            this.Count = this.Count + value;
        }

        private void decrementCount(int value)
        {
            this.Count = Math.Max(this.Count - value, 0);
        }

        public void Add(T item)
        {
            AddLast(item);
        }

        private void ClearBuffer(int logicalIndex, int length)
        {
            int offset = toBufferIndex(logicalIndex);
            if (offset + length > this.Capacity)
            {
                int len = this.Capacity - offset;
                Array.Clear(this.buffer, offset, len);

                len = toBufferIndex(logicalIndex + length);
                Array.Clear(this.buffer, 0, len);
            }
            else
            {
                Array.Clear(this.buffer, offset, length);
            }
        }

        public void Clear()
        {
            if (this.Count > 0)
            {
                ClearBuffer(0, this.Count);
            }
            this.Count = 0;
            this.startOffset = 0;
        }

        public bool Contains(T item)
        {
            return this.IndexOf(item) != -1;
        }

        public void CopyTo(T[] array, int arrayIndex)
        {
            if (null == array)
            {
                throw new ArgumentNullException("array", "Array is null");
            }

            if (null == this.buffer)
            {
                return;
            }

            checkArgumentsOutOfRange(array.Length, arrayIndex, this.Count);

            if (0 != this.startOffset
                && this.startOffset + this.Count >= this.Capacity)
            {
                int lengthFromStart = this.Capacity - this.startOffset;
                int lengthFromEnd = this.Count - lengthFromStart;

                Array.Copy(
                    buffer, this.startOffset, array, 0, lengthFromStart);

                Array.Copy(
                    buffer, 0, array, lengthFromStart, lengthFromEnd);
            }
            else
            {
                Array.Copy(
                    buffer, this.startOffset, array, 0, Count);
            }
        }

        public bool Remove(T item)
        {
            bool result = true;
            int index = IndexOf(item);

            if (-1 == index)
            {
                result = false;
            }
            else
            {
                RemoveAt(index);
            }

            return result;
        }

        #endregion

        #region List<T>

        public T this[int index]
        {
            get
            {
                return this.Get(index);
            }

            set
            {
                this.Set(index, value);
            }
        }

        public void Insert(int index, T item)
        {
            ensureCapacityFor(1);

            if (index == 0)
            {
                AddFirst(item);
                return;
            }
            else if (index == Count)
            {
                AddLast(item);
                return;
            }

            InsertRange(index, new[] { item });
        }

        public int IndexOf(T item)
        {
            int index = 0;
            foreach (var myItem in this)
            {
                if (myItem.Equals(item))
                {
                    break;
                }
                ++index;
            }

            if (index == this.Count)
            {
                index = -1;
            }

            return index;
        }

        public void RemoveAt(int index)
        {
            if (index == 0)
            {
                RemoveFirst();
                return;
            }
            else if (index == Count - 1)
            {
                RemoveLast();
                return;
            }

            RemoveRange(index, 1);
        }
        #endregion

        public void AddFirst(T item)
        {
            ensureCapacityFor(1);
            buffer[postShiftStartOffset(-1)] = item;
            incrementCount(1);
        }

        public void AddLast(T item)
        {
            ensureCapacityFor(1);
            buffer[toBufferIndex(this.Count)] = item;
            incrementCount(1);
        }

        public T RemoveFirst()
        {
            if (this.IsEmpty)
            {
                throw new InvalidOperationException("The Deque is empty");
            }

            T result = buffer[this.startOffset];
            buffer[preShiftStartOffset(1)] = default(T);
            decrementCount(1);
            return result;
        }

        public T RemoveLast()
        {
            if (this.IsEmpty)
            {
                throw new InvalidOperationException("The Deque is empty");
            }

            decrementCount(1);
            int endIndex = toBufferIndex(this.Count);
            T result = buffer[endIndex];
            buffer[endIndex] = default(T);

            return result;
        }

        public void AddRange(IEnumerable<T> collection)
        {
            AddLastRange(collection);
        }

        public void AddFirstRange(IEnumerable<T> collection)
        {
            AddFirstRange(collection, 0, DequeUtility.Count(collection));
        }

        public void AddFirstRange(
            IEnumerable<T> collection,
            int fromIndex,
            int count)
        {
            InsertRange(0, collection, fromIndex, count);
        }

        public void AddLastRange(IEnumerable<T> collection)
        {
            AddLastRange(collection, 0, DequeUtility.Count(collection));
        }

        public void AddLastRange(
            IEnumerable<T> collection,
            int fromIndex,
            int count)
        {
            InsertRange(this.Count, collection, fromIndex, count);
        }

        public void InsertRange(int index, IEnumerable<T> collection)
        {
            int count = DequeUtility.Count(collection);
            this.InsertRange(index, collection, 0, count);
        }

        public void InsertRange(
            int index,
            IEnumerable<T> collection,
            int fromIndex,
            int count)
        {
            checkIndexOutOfRange(index - 1);

            if (0 == count)
            {
                return;
            }

            ensureCapacityFor(count);

            if (index < this.Count / 2)
            {
                if (index > 0)
                {
                    int copyCount = index;
                    int shiftIndex = this.Capacity - count;
                    for (int j = 0; j < copyCount; j++)
                    {
                        buffer[toBufferIndex(shiftIndex + j)] =
                            buffer[toBufferIndex(j)];
                    }
                }

                this.shiftStartOffset(-count);

            }
            else
            {
                if (index < this.Count)
                {
                    int copyCount = this.Count - index;
                    int shiftIndex = index + count;
                    for (int j = 0; j < copyCount; j++)
                    {
                        buffer[toBufferIndex(shiftIndex + j)] =
                            buffer[toBufferIndex(index + j)];
                    }
                }
            }

            int i = index;
            foreach (T item in collection)
            {
                buffer[toBufferIndex(i)] = item;
                ++i;
            }

            incrementCount(count);
        }

        public void RemoveRange(int index, int count)
        {
            if (this.IsEmpty)
            {
                throw new InvalidOperationException("The Deque is empty");
            }
            if (index > Count - count)
            {
                throw new IndexOutOfRangeException(
                    "The supplied index is greater than the Count");
            }

            ClearBuffer(index, count);

            if (index == 0)
            {
                this.shiftStartOffset(count);
                this.Count -= count;
                return;
            }
            else if (index == Count - count)
            {
                this.Count -= count;
                return;
            }

            if ((index + (count / 2)) < Count / 2)
            {
                int copyCount = index;
                int writeIndex = count;
                for (int j = 0; j < copyCount; j++)
                {
                    buffer[toBufferIndex(writeIndex + j)]
                        = buffer[toBufferIndex(j)];
                }

                this.shiftStartOffset(count);
            }
            else
            {
                int copyCount = Count - count - index;
                int readIndex = index + count;
                for (int j = 0; j < copyCount; ++j)
                {
                    buffer[toBufferIndex(index + j)] =
                        buffer[toBufferIndex(readIndex + j)];
                }
            }

            decrementCount(count);
        }
        public T Get(int index)
        {
            checkIndexOutOfRange(index);
            return buffer[toBufferIndex(index)];
        }

        public void Set(int index, T item)
        {
            checkIndexOutOfRange(index);
            buffer[toBufferIndex(index)] = item;
        }

    }
}


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

namespace Queue_on_Bus_Stop
{
    internal class Program
    {
        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 void Main(string[] args)
        {
            int n = int.Parse(reader.ReadLine());

            string[] ss = reader.ReadLine().Split(' ');
            int n = int.Parse(ss[0]);
            int k = int.Parse(ss[0]);

            writer.WriteLine("{0}", (1.1).ToString("#.0000000", CultureInfo.GetCultureInfo("en-US")));
            writer.Flush();
        }
    }
}


using System;
using System.IO;
using System.Linq;

namespace Tournir249
{
	public class ProgramA
	{

		public static void Main(string[] args)
		{
			new ProgramA().run();
		}

		public void run()
		{
			using (StreamReader input = new StreamReader("input.txt"))
			using (StreamWriter output = new StreamWriter("output.txt"))
			{
				int[] numbers = Console.ReadLine().Split(' ').Select(stringNumber => int.Parse(stringNumber)).ToArray();
				int n = numbers[0], m = numbers[1];

				int[] a = Console.ReadLine().Split(' ').Select(stringNumber => int.Parse(stringNumber)).ToArray();
				int k = 0, i = 0, cm = 0;

				while (i < n)
				{
					while (i < n && cm + a[i] <= m)
					{
						cm += a[i];
						i++;
					}
					cm = 0;
					k++;
				}

				Console.WriteLine(k);
			}
		}

	}
}


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

// (づ*ω*)づﾐ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public object Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        var a = ReadIntArray();
        int c = 0;
        int ans = 0;
        while (c < m)
        {
            ans++;
            int x = m;
            while (c < m && a[c] <= x)
            {
                c++;
                x -= a[c];
            }
        }

        return ans;
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;

    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = Console.In;
        writer = new StreamWriter(Console.OpenStandardOutput());
#endif
        try
        {
            object result = new Solver().Solve();
            if (result != null)
                writer.WriteLine(result);
        }
        catch (Exception ex)
        {
#if DEBUG
            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));
    }

    #endregion
}


using System;

class abc
{
    static void Main(String[] args)
    {
        int b = int.Parse(Console.ReadLine().Trim());

        int a = 0;
        for (int i = 1; i < n; i++)
        {
            if (b % i == 0)
            {
                a++;
            }
        }

        Console.WriteLine(a);
    }
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int employees = Convert.ToInt32(Console.ReadLine());
            int combinations = 0;
            for (int i = 1; i <= Math.Sqrt(employees); i++)
            {
                if (i % employees-i == 0)
                {
                    combinations++;
                }
            }
            Console.WriteLine(combinations);
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static int N;
        static long MOD = 1000000009;
        static long bad_ways = 1, all_ways = 1, good_ways;

        public static void Main()
        {
            N = Convert.ToInt32(Console.ReadLine());

            for (int i = 1; i <= 3 * N; ++i)
            {
                all_ways *= 3;
                all_ways %= MOD;
            }

            for (int i = 1; i <= N; ++i)
            {
                bad_ways *= 7;
                bad_ways %= MOD;
            }

            good_ways = (all_ways - bad_ways + MOD) % MOD;

            Console.WriteLine(good_ways);
        }

    }

}


using System;
using System.Collections.Generic;

namespace cf78 {
    internal class Program {
        private static void Main(string[] args) {
            string s = Console.ReadLine();

            List<Cube> unique = new List<Cube>();

            Dictionary<int, int> used = new Dictionary<int, int>();

            for (int a1 = 0; a1 < 6; a1++) {
                used.Add(a1, 0);
                for (int a2 = 0; a2 < 6; a2++) {
                    if (used.ContainsKey(a2)) continue;
                    used.Add(a2, 0);
                    for (int a3 = 0; a3 < 6; a3++) {
                        if (used.ContainsKey(a3)) continue;
                        used.Add(a3, 0);
                        for (int a4 = 0; a4 < 6; a4++) {
                            if (used.ContainsKey(a4)) continue;
                            used.Add(a4, 0);

                            for (int a5 = 0; a5 < 6; a5++) {
                                if (used.ContainsKey(a5)) continue;
                                used.Add(a5, 0);

                                for (int a6 = 0; a6 < 6; a6++) {
                                    if (used.ContainsKey(a6))
                                        continue;
                                    Cube cube = new Cube(a1, a2, a3, a4, a5, a6);
                                    if (IsNew(unique, cube)) unique.Add(cube);
                                }
                                used.Remove(a5);
                            }
                            used.Remove(a4);
                        }
                        used.Remove(a3);
                    }
                    used.Remove(a2);
                }
                used.Remove(a1);
            }
            int result = 0;
            Dictionary<string, int> cc = new Dictionary<string, int>();
            Dictionary<string, int> ccc = new Dictionary<string, int>();
            foreach (Cube cube in unique) {
                string t = cube.GetPosition(s);
                if (!cc.ContainsKey(t) && !ccc.ContainsKey(t)) {
                    cc.Add(t, 0);
                    AddCCC(cube, ccc, s);
                    result++;
                }
            }
            Console.WriteLine(result);
        }

        private static void AddCCC(Cube cube, Dictionary<string, int> ccc, string s) {
            List<Cube> newCubes = GetAll(cube);
            foreach (Cube newCube in newCubes) {
                string t = newCube.GetPosition(s);
                if (!ccc.ContainsKey(t)) ccc.Add(t, 0);
            }
        }

        private static List<Cube> GetAll(Cube cube) {
            List<Cube> newCubes = new List<Cube>();
            newCubes.Add(cube);
            newCubes.Add(cube.RotateLeft());
            newCubes.Add(cube.RotateLeft().RotateLeft());
            newCubes.Add(cube.RotateLeft().RotateLeft().RotateLeft());
            int count = newCubes.Count;
            for (int i = 0; i < count; i++) {
                newCubes.Add(newCubes[i].RotateBottom());
                newCubes.Add(newCubes[i].RotateBottom().RotateBottom());
                newCubes.Add(newCubes[i].RotateBottom().RotateBottom().RotateBottom());
            }
            return newCubes;
        }

        private static bool IsNew(List<Cube> cubes, Cube cube) {
            List<Cube> newCubes = GetAll(cube);
            for (int i = 0; i < newCubes.Count; i++) {
                foreach (Cube oldCube in cubes) {
                    if (oldCube.Equals(newCubes[i])) return false;
                }
            }
            return true;
        }
    }

    internal class Cube {
        private int _back;
        private int _bottom;
        private int _front;
        private int _left;
        private int _right;
        private int _top;

        public Cube(int left, int front, int right, int back, int top, int bottom) {
            _back = back;
            _bottom = bottom;
            _front = front;
            _left = left;
            _right = right;
            _top = top;
        }

        public Cube() {
            _left = 0;
            _front = 1;
            _right = 2;
            _back = 3;
            _top = 4;
            _bottom = 5;
        }

        public int Back {
            get { return _back; }
        }

        public int Bottom {
            get { return _bottom; }
        }

        public int Front {
            get { return _front; }
        }

        public int Left {
            get { return _left; }
        }

        public int Right {
            get { return _right; }
        }

        public int Top {
            get { return _top; }
        }

        public override string ToString() {
            return _left.ToString() + _front + _right + _back + _top + _bottom;
        }

        public Cube RotateLeft() {
            Cube cube = new Cube();
            cube._left = _front;
            cube._front = _right;
            cube._right = _back;
            cube._back = _left;

            cube._top = _top;
            cube._bottom = _bottom;
            return cube;
        }

        public Cube RotateBottom() {
            Cube cube = new Cube();
            cube._left = _left;
            cube._right = _right;

            cube._front = _top;
            cube._bottom = _front;
            cube._top = _back;
            cube._back = _bottom;
            return cube;
        }

        public bool Equals(Cube cube) {
            if (_left != cube._left) return false;
            if (_front != cube._front)
                return false;
            if (_right != cube._right) return false;
            if (_back != cube._back)
                return false;
            if (_top != cube._top)
                return false;
            if (_bottom != cube._bottom)
                return false;
            return true;
        }

        public string GetPosition(string s) {
            return s[_left].ToString() + s[_front] + s[_right] + s[_back] + s[_top]
                   + s[_bottom];
        }
    }
}


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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            long[] ab = Console.ReadLine().Split().Select(long.Parse).ToArray();

            long a = ab[0];
            long b = ab[1];

            long A = a + b;

            List<long> factors = new List<long>();

            for (int i = 1; i <= A; i++)
            {
                if (A % i == 0)
                {
                    factors.Add(i);
                }
            }

            long l = factors[factors.Count()/2];
            long w = A / l;

            long P = ((2 * A * l) + (2 * A * w)) / A;

            Console.WriteLine(P);

            Console.Read();
        }
    }
}


using System;

namespace CF1029F
{
	class Program
	{
		static void Main(string[] args)
		{
			while(true) {
				string[] div = Console.ReadLine().Split(' ');
				Int64 a = Convert.ToInt64(div[0]), b = Convert.ToInt64(div[1]), _min = Int64.MaxValue;
				Int64 tot = a + b, siz = (Int64)Math.Sqrt(tot) + 1, len = a;

				for(int i = 1;i < siz;i++) {
					if(a % i == 0)
						len = a / i;
					if(tot % i == 0 && tot / i >= len)
						_min = Math.Min(_min, ((tot / i + i) << 1));
				}
				len = b;
				for(int i = 1;i < siz;i++) {
					if(b % i == 0)
						len = b / i;

					if(tot % i == 0 && tot / i >= len)
						_min = Math.Min(_min, ((tot / i + i) << 1));
				}

				Console.WriteLine(_min.ToString());
			}
		}
	}
}


using System;
using System.IO;
namespace C_
{
    class Program
    {
        static void Main(string[] args)

        {

            //int [] arr = new int [4];
            String s = Console.ReadLine();

            int frist = 0;
            int count = 0;
            char x;
            int num = 0, path=0;
            for (int i = 0; i < s.Length; i++)
            for (x = 'a'; x <= 'z'; x++)
            {
                    if(s[x]==x)
                        {
                        num = x - 97;
                        path = Math.Abs(frist - num);

                        if (path < 13)
                        {
                            count += path;
                        }
                        else
                        {
                            count += 26 - path;
                        }
                        frist = num;
                    }
            }
            Console.WriteLine(count);

        }
    }
}


     static void Main(string[] args)
        {
            int sum = 0;
            int[] segmant = { 6, 2, 5, 5, 4, 5, 6, 3, 7, 6, 8, 4, 7, 7, 6, 7 };
            Console.WriteLine("Enter from number: ");
            int a = int.Parse(Console.ReadLine());

            Console.WriteLine("Enter to number: ");
            int b = int.Parse(Console.ReadLine());

            for (int i = a; i < segmant.Length; i++)
            {
                sum = sum + segmant[i];
                if (i == b)
                {
                    break;
                }
            }

            Console.WriteLine("The total is: " + sum);
            Console.ReadKey();
        }


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

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            int sum = 0;
            int[] segmant = { 6, 2, 5, 5, 4, 5, 6, 3, 7, 6, 8, 4, 7, 7, 6, 7 };

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

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

            for (int i = a; i < segmant.Length; i++)
            {
                sum = sum + segmant[i];
                if (i == b)
                {
                    break;
                }
            }

            Console.WriteLine("The total is: " + sum);
            Console.ReadKey();
        }
    }
}


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

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {

            //int zero = 6;
            //int nine = 6;
            //int six = 6;

            //int two = 5;
            //int three = 5;
            //int five = 5;

            //int one = 2;
            //int four = 4;
            //int seven = 3;
            //int eight = 7;

            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());

            int sum = 0;
            for (int i = a; i <= b; i++)
            {
                string temp = i + "";
                for (int j = 0; j < temp.Length; j++)
                {
                    if (temp.ElementAt(j) == '0' || temp.ElementAt(j) == '6' || temp.ElementAt(j) == '9')
                    {
                        sum += 6;
                    }
                    else if (temp.ElementAt(j) == '2' || temp.ElementAt(j) == '3'|| temp.ElementAt(j) == '5')
                    {
                        sum += 5;
                    }
                    else if (temp.ElementAt(j) == '1')
                    {
                        sum += 2;
                    }
                    else if (temp.ElementAt(j) == '4')
                    {
                        sum += 4;
                    }
                    else if (temp.ElementAt(j) == '7')
                    {
                        sum += 3;
                    }
                    else
                    {
                        sum += 7;
                    }
                }
            }

            Console.WriteLine(sum);
            Console.Read();
        }
    }
}


string[] input = Console.ReadLine().Split(' ');
int n = Convert.ToInt32( input [ 0 ] );
int a = Convert.ToInt32( input [ 1 ] );
int result = 1;

if ( a == 1 || a == n )
    result = 1;
else
{
    if ( a % 2 == 0 )
    {
        result += ( n - a ) / 2;
    }
    else
    {
        result += ( a - 1 ) / 2;
    }
}

Console.WriteLine( result );


using System;

namespace DistanceTask
{
	public static class DistanceTask
	{
		// Расстояние от точки (x, y) до отрезка AB с координатами A(ax, ay), B(bx, by)
		public static double GetDistanceToSegment(double ax, double ay, double bx, double by, double x, double y)
		{
            double perpendicular = Math.Abs((by - ay) * x - (bx - ax) * y + bx * ay - by * ax)
                / Math.Sqrt((by - ay) * (by - ay) + (bx - ax) * (bx - ax));
            double lenXA = Math.Sqrt((x - ax) * (x - ax) + (y - ay) * (y - ay));
            double lenXB = Math.Sqrt((x - bx) * (x - bx) + (y - by) * (y - by));
            double lenAB = Math.Sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));

            if (ax == bx && ay == by)
                return lenXA;
            else if (lenXA * lenXA > lenXB * lenXB + lenAB * lenAB || lenXB * lenXB > lenXA * lenXA + lenAB * lenAB)
                return Math.Min(lenXA, lenXB);
            else
                return perpendicular;
        }
	}
}


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

namespace asdf {
    class Program {
        static void Main(string[] args) {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            int n = input[0], m = input[1], min = input[2], max = input[3];

            if(n-m >= 2) {
                Console.WriteLine("Correct");
                return;
            }

            bool minFlag = false, maxFlag = false;
            int[] mArray = new int[m];
            for(int i = 0; i < m; i++) {
                mArray[i] = int.Parse(Console.ReadLine());
                if(mArray[i] == min) {
                    minFlag = true;
                }
                if(mArray[i] == max) {
                    maxFlag = true;
                }
            }

            if(minFlag && maxFlag) {
                Console.WriteLine("Correct");
                return;
            }
            else if(n-m > 0 && (minFlag || maxFlag)) {
                Console.WriteLine("Correct");
            }
            else {
                Console.WriteLine("Incorrect");
            }
        }
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29424.173
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{9471B2F7-4CA7-4D0D-BD91-D59F4A992C02}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{9471B2F7-4CA7-4D0D-BD91-D59F4A992C02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{9471B2F7-4CA7-4D0D-BD91-D59F4A992C02}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{9471B2F7-4CA7-4D0D-BD91-D59F4A992C02}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{9471B2F7-4CA7-4D0D-BD91-D59F4A992C02}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {B94F39A0-E050-4998-9EA8-B4F7B36A08DC}
	EndGlobalSection
EndGlobal


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

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

            long n = long.Parse(s[0]);
            long k = long.Parse(s[1]);

            long lim =(long) (n/2);

            long ans = -1;
            int count = 0;

            for (long i=1;i<=lim;i++)
            {
                if (n%i==0)
                {
                    count++;
                    if (count==k)
                    {
                        ans = i;
                        break;
                    }
                }
            }

            if (count + 1 == k) ans = n;

            Console.Write(ans);
        }
    }
}


using System;

namespace CodeForces5
{
	class Program
	{
		static void Main(string[] args)
		{
			string[] Data = Console.ReadLine().Split(' ');
			long[] data = Array.ConvertAll(Data, x => long.Parse(x));
			long count = 0, result = 0;
			for (long i = 1; i <= data[0]; i++)
				if (data[0] % i == 0)
					if (++count == data[1])
					{
						result = i;
						break;
					}
			Console.WriteLine(data[1] == count ? result : -1);
		}
	}
}


Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ааа", "ааа\ааа.csproj", "{39F427EA-74BD-4CC2-B84E-670FC4E9D7E3}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{39F427EA-74BD-4CC2-B84E-670FC4E9D7E3}.Debug|x86.ActiveCfg = Debug|x86
		{39F427EA-74BD-4CC2-B84E-670FC4E9D7E3}.Debug|x86.Build.0 = Debug|x86
		{39F427EA-74BD-4CC2-B84E-670FC4E9D7E3}.Release|x86.ActiveCfg = Release|x86
		{39F427EA-74BD-4CC2-B84E-670FC4E9D7E3}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


class ThueMorseGame
{
	public string get(int n, int m)
	{
		var isAlice = true;
		if (m == 1) {
			return "Bob";
		}
		var minus = m % 2 == 0 ? m : m - 1;
		while (true) {
			if (n <= m) {
				if (isAlice) {
					return "Alice";
				}
				else {
					return "Bob";
				}
			}
			if (n == 3) {
				if (m >= 3) {
					if (isAlice) {
						return "Alice";
					}
					else {
						return "Bob";
					}
				}
				else {
					if (isAlice) {
						return "Bob";
					}
					else {
						return "Alice";
					}
				}
			}
			if (isAlice) {
				isAlice = false;
			}
			else {
				isAlice = true;
			}

			n -= minus;
		}
	}
}


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

namespace A_kth_divisor
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            long n = long.Parse(input[0]);
            long k = long.Parse(input[1]);

            //int sqrt = (int)Math.Sqrt(n);
            int counter = 0;
            for (int i = 1; i <= n; i++)
            {
                if (n % i == 0)
                {
                    counter++;
                    if (counter == k) { Console.WriteLine(i); break; }
                }
                else if (counter > k) { Console.WriteLine("-1"); break; }

            }

            if (counter < k) Console.WriteLine("-1");
        }
    }
}


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

namespace k_divisor
{
    class Program
    {
        static long max = 31622780;
        static long[] primes = new long[max];
        static List<long> facts = new List<long>();
        static List<long> factoring = new List<long>();
        static List<long> divisors = new List<long>();
        static void Cieve()
        {
            for (long i = 4; i < max; i += 2) primes[i] = 2;
            for (long i = 3; i * i < max; i += 2)
                if (primes[i] == -1)
                    for (long j = i * i; j < max; j += 2 * i)
                        primes[j] = i;
        }

        static void prime_fact(long n)
        {
            for (long i = 2; i < max; i++)
            {
                if (primes[i] == -1 && n % i == 0)
                    facts.Add(i);
            }
        }

        static void factorization(long n)
        {
            long aux = n;
            for (int i = 0; i < facts.Count; i++)
            {
                int c = 0;
                long v = facts[i];
                while (aux % v == 0)
                {
                    c++;
                    aux /= v;
                }
                factoring.Add(v); factoring.Add(c);
            }
            if(aux > 1){
                factoring.Add(aux);
                factoring.Add(1);
            }
        }

        static void Divisors(long n)
        {
            for (int i = 0; i < factoring.Count; i += 2)
            {
                int c = 0;
                long v = factoring[i];
                for (int k = 1; k <= factoring[i+1]; k++)
                {
                    long x = (long)Math.Pow(v, k);
                    if (x < n)
                    {
                        divisors.Add(x);
                        c++;
                    }
                    else
                        break;
                }
                int t = divisors.Count;
                for(int j = t-c; j < t; j++)
                    for(int s = 0; s < t-c; s++){
                        long aux = divisors[j]*divisors[s];
                        if(aux < n)
                            divisors.Add(aux);
                    }
            }
            divisors.Add(n);
            divisors.Insert(0, 1);
            divisors.Sort();
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            char []sep= new char[]{' '};
            string[] ns = s.Split(sep,2);
            long n = long.Parse(ns[0]);
            long k = long.Parse(ns[1]);
            if (n == 1)
            {
                if(k == 1)
                    Console.WriteLine(1);
                else
                    Console.WriteLine(-1);
                return;
            }
            for (long i = 2; i < max; i++)
            {
                primes[i] = -1;
            }
            Cieve();
            prime_fact(n);
            factorization(n);
            Divisors(n);
            if (k > divisors.Count)
            {
                Console.WriteLine(-1);
                return;
            }
            int t = (int)k;
            Console.WriteLine(divisors[t-1]);
        }
    }
}


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

namespace _41a
{

    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            long n = long.Parse(s[0]);
            int k = int.Parse(s[1]);
            List<long> raan =new List<long>();
            long c=1;

                for (int i = 1; i <= n; i++)
                {
                    if (n % c == 0)
                    {
                        raan.Add(c);
                        c++;
                    }
                    else
                    {
                        c++;
                        continue;
                    }
                }

                if (raan.Count < k)
                {
                    Console.WriteLine(-1);
                }
                else
                {
                    Console.WriteLine(raan[k-1]);
                }

        }
    }
}


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

namespace _2609cry
{
    class Program
    {
        static void Main(string[] args)
        {
            String [] str = Console.ReadLine().Split();
            Int64 n = Convert.ToInt64(str[0]);
            Int64 m = Convert.ToInt64(str[1]);

            Int64 count = 1;
            bool flag = false; Int64 n1 = n;
            if (count == m)
            {
                flag = true;
                Console.WriteLine(1);

            }
            else
            {
                for (int i = 2; i < n1; i++)
                {
                    if(n1 % i == 0)
                    {
                        count++;
                        if (count == m)
                        {
                            flag = true;
                            Console.WriteLine(i);
                            break;
                        }
                    }
                }

                if (count + 1 == m) { Console.WriteLine(n1); flag = true; }
            }

            if(flag==false) Console.WriteLine(-1);

        }
    }
}


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

namespace codeforces
{
	class Program
	{
		public const int Osn = 1000000007;

		public class Pair
		{
			public long First;

			public long Second;
		}

		public class PairComparer : IComparer<Pair>
		{
			public int Compare(Pair x, Pair y)
			{
				if (x.First < y.First || (x.First == y.First && x.Second > y.Second))
					return -1;
				return 1;
			}
		}

		public static long GetGcd(long a, long b)
		{
			while (true)
			{
				if (b == 0)
					return a;
				var a1 = a;
				a = b;
				b = a1 % 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 ReadString()
		{
			return Console.ReadLine();
		}

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

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

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

		public static long ReadLong()
		{
			var s = Console.ReadLine();
			return long.Parse(s);
		}

		public class Vertex
		{
			public int Was;

			public List<int> Edges;
		}

		public static List<Vertex> Graph = new List<Vertex>();

		public static bool Dfs(int u)
		{
			if (Graph[u].Was == 1) return true;
			if (Graph[u].Was == 2) return false;
			Graph[u].Was = 1;
			foreach (var t in Graph[u].Edges)
			{
				if (Dfs(t)) return true;
			}

			Graph[u].Was = 2;
			return false;
		}

		public static bool IsPrime(long x)
		{
			for (var j = 2; j * j <= x; ++j)
				if (x % j == 0)
					return false;
			return true;
		}

		public class LinkedVertex
		{
			public int Next;

			public int Prev;

			public int Value;
		}

		public static int BinarySearch(List<int> list, int value)
		{
			var l = -1;
			var r = list.Count;
			while (r - l > 1)
			{
				var m = (r + l) / 2;
				if (list[m] >= value)
					r = m;
				else
					l = m;
			}

			return r;
		}

		public static Dictionary<long, long> mp = new Dictionary<long, long>();
		public static long Go(long u, long v, long w)
		{
			long ans = 0;
			while (u != v)
				if (u > v)
				{
					if (!mp.ContainsKey(u))
						mp.Add(u, 0);
					ans += mp[u];
					mp[u] += w;
					u /= 2;
				}
				else
				{
					if (!mp.ContainsKey(v))
						mp.Add(v, 0);
					ans += mp[v];
					mp[v] += w;
					v /= 2;
				}
			return ans;
		}

		public static int GetAns(int x, int pow)
		{
			if (pow == 0)
				return 1;
			if (pow % 2 == 1)
				return (GetAns(x, pow - 1) * 8) % 10;
			var t = GetAns(x, pow / 2);
			return (t * t) % 10;
		}

		public static int ans = 0;
		public static int move = 0;
		public static bool good = false;
		public static int[] x = { 0, 0, 0 };

		public static void solve(int a, int b, int c, int n)
		{
			if (ans != 0)
				return;
			if (n > 0)
			{
				solve(a, c, b, n - 1);
				move++;
				x[a]--;
				x[b]++;
				if (x[a] == x[b] && x[b] == x[c] && ans == 0)
				{
					ans = move;
				}
				solve(c, b, a, n - 1);
			}
		}

		private static void Main()
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/
			var l = ReadListOfLongs();
			var n = l[0];
			var k = l[1];
			var dividers = new List<long>();
			for (var i = 1; i * i <= n; ++i)
			{
				if (n % i == 0)
				{
					dividers.Add(i);
					if (i * i != n)
						dividers.Add(n / i);
				}
			}
			dividers.Sort();
			if (dividers.Count < k)
				Console.WriteLine(-1);
			else
			{
				Console.WriteLine(dividers[(int)k - 1]);
			}
			Console.ReadLine();
			/*			input.Close();
			output.Close();*/
		}
	}
}


using System;

namespace CF3
{
    class Program
    {
        public static int SmallDiv(int n)
        {
            int div = 1;
            for (int i = 2; i <= n/2; i++)
                if (n % i == 0)
                {
                    div = i;
                    break;
                }

            return (div == 1) ? n : div;
        }

        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int k = int.Parse(Console.ReadLine());
            string s = "";
            int div;

            for (int i = 0; i < k; i++)
            {
                div = SmallDiv(n);
                if(i < k - 1 && div == n)
                {
                    s = "-1";
                    break;
                }
                s += (i != k - 1) ? div : n;
                s += " ";
                n /= div;
            }
            Console.WriteLine(s);
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] A = new int[30];
            int pr = 1, j = 2, sz = 1;
            string[] a = Console.ReadLine().Split(' ');
            int n = int.Parse(a[0]);
            int k = int.Parse(a[1]);

            for (int i = 1; i < k; i++) {

                while (n % j != 0) {
                    j++;
                }
                n /= j;
                A[sz++] = j;
            }

            if (n > 1)
            {
                A[sz++] = n;
                for (int i = 1; i < sz; i++)
                {
                    Console.Write(A[i]);
                    Console.Write(' ');
                }
            }
            else
            {
                Console.Write(-1);
            }

            //Console.ReadKey();
        }
    }
}


using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using static System.Math;

class P
{
    static void Main()
    {
        long[] nb = Console.ReadLine().Split().Select(long.Parse).ToArray();
        //えっと、つまり素因数分解して約数の数を数えればOK
        var factors = Factors(nb[1]);
        long res = int.MaxValue;
        foreach (var factor in factors.GroupBy(x => x))
        {
            var current = factor.Key;
            long count = 0;
            while (nb[0] >= current)
            {
                count += nb[0] / current;
                current *= factor.Key;
            }
            res = Min(res, count / factor.Count());
        }
        Console.WriteLine(res);
    }

    static long[] Factors(long n)
    {
        long i = 3;
        List<long> res = new List<long>();
        if(n % 2 == 0)
        {
            res.Add(2);
            n /= 2;
        }
        double ub = Sqrt(n);
        while (i <= ub + 1)
        {
            if (n % i == 0)
            {
                res.Add(i);
                n /= i;
            }
            else
            {
                i += 2;
            }
        }
        if (n != 1) res.Add(n);
        return res.ToArray();
    }
}


using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using static System.Math;

class P
{
    static void Main()
    {
        long[] nb = Console.ReadLine().Split().Select(long.Parse).ToArray();
        //えっと、つまり素因数分解して約数の数を数えればOK
        var factors = Factors(nb[1]);
        long res = long.MaxValue;
        foreach (var factor in factors.GroupBy(x => x))
        {
            var current = factor.Key;
            long count = 0;
            while (nb[0] >= current)
            {
                count += nb[0] / current;
                if (current <= 1e8) current *= factor.Key;
            }
            res = Min(res, count / factor.Count());
        }
        Console.WriteLine(res);
    }

    static long[] Factors(long n)
    {
        List<long> res = new List<long>();
        if(n % 2 == 0)
        {
            res.Add(2);
            n /= 2;
        }
        long i = 3;
        double ub = Sqrt(n);
        while (i <= ub + 1)
        {
            if (n % i == 0)
            {
                res.Add(i);
                n /= i;
            }
            else
            {
                i += 2;
            }
        }
        if (n != 1) res.Add(n);
        return res.ToArray();
    }
}


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

namespace Algorithms
{
    class Program
    {
        static void Main(string[] args)
        {
            var nAndv = Console.ReadLine().Split();
            var n = int.Parse(nAndv[0]);
            var v = int.Parse(nAndv[1]);
            var result = SashasTrip(n, v);

			Console.WriteLine(result);

        }

        private static int SashasTrip(int numberOfCities, int tankCapacity)
        {
            if (numberOfCities - 1 == tankCapacity)
                return tankCapacity;

            int totalAmount = 0;
            int cityIndex = 2;

            totalAmount += tankCapacity;

            while (numberOfCities - 1 != tankCapacity)
            {
                totalAmount += cityIndex;

                numberOfCities--;
                cityIndex++;
            }

            return totalAmount;
        }
            if (numberOfCities - 1 == tankCapacity)
                return tankCapacity;

            var totalLitresNeeded = numberOfCities - 1;

            int totalAmount = 0;

            int cityIndex = 1;
            while (totalLitresNeeded != 0)
            {
                if (totalLitresNeeded > tankCapacity)
                {
                    totalLitresNeeded -= tankCapacity;
                    totalAmount += cityIndex * tankCapacity;
                }
                else if (tankCapacity > totalLitresNeeded)
                {
                    totalAmount += cityIndex * totalLitresNeeded;
                    totalLitresNeeded = 0;
                }
                else
                {
                    totalAmount += cityIndex * tankCapacity;
                    totalLitresNeeded = 0;
                }

                cityIndex++;
            }

            return totalAmount;
        }
    }
}


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

namespace Algorithms
{
    class Program
    {

        static void Main(string[] args)
        {
            var nAndv = Console.ReadLine().Split();
            var n = int.Parse(nAndv[0]);
            var v = int.Parse(nAndv[1]);
            var result = SashasTrip(n, v);

            Console.WriteLine(result);
        }

        private static int SashasTrip(int numberOfCities, int tankCapacity)
        {
            if (numberOfCities - 1 == tankCapacity)
                return tankCapacity;

            if (tankCapacity > numberOfCities)
                return --numberOfCities;

            int totalAmount = 0;
            int cityIndex = 2;

            totalAmount += tankCapacity;
            numberOfCities--;

            while (numberOfCities-- != tankCapacity)
            {
                totalAmount += cityIndex;

                cityIndex++;
            }

            return totalAmount;
        }

    }
}


using System;
namespace BasicProgramming
{
    class Program
    {
        static void Main(string[] args)
        {

            int n = int.Parse(Console.ReadLine());
            int v = int.Parse(Console.ReadLine());
            int i=0,litter,lastCity,mNo;
            litter = n - 1;
            lastCity = v - 1;
            mNo = litter - lastCity;
            if (litter == v)
            {
                i = v;
                Console.WriteLine(i);
            }
            else if (litter > v)
            {
                i = 1;
                for (int m = 2; m <= mNo; m++)
                {
                        i += m;
                }
                i += lastCity;
                Console.WriteLine(i);
            }

        }
    }
}


using System;

namespace A131
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            bool mayus = true;

            foreach (char letter in input.Substring(1))
            {
                if (char.IsUpper(letter))
                    mayus = false;
            }

            Console.WriteLine(mayus ? (char.ToUpper(input[0]) + input.Substring(1)) : input;
        }
    }
}


using System;
using System.Collections.Generic;

class Program
{
    public static void Main(string[] args)
    {
        string[] input=Console.ReadLine().Split();
        int a=int.Parse(input[0]);
        int b=int.Parse(input[1]);
        XORSumW(a,b);
        Console.ReadLine();
    }

    private static List<int> split(int a)
    {
        List<int> ret=new List<int>();
        while(a>0)
        {
            ret.Add(a%3);
            a/=3;
        }
        return ret;
    }

    private static int padW(List<int> a, List<int> b)
    {
        if(a.Count>b.Count)
        {
            int diff=a.Count-b.Count;
            for(int i=0;i<diff;i++)
            {
                b.Add(0);
            }
        }
        else
        {
            int diff=b.Count-a.Count;
            for(int i=0;i<diff;i++)
            {
                a.Add(0);
            }
        }

        //now both of equal length
        List<int> c=new List<int>();
        for(int i=0;i<a.Count;i++)
        {
            int tmp=(a[i]+b[i])%3;
            c.Add(tmp);
        }

        int multiplier=1;
        int num=0;
        foreach(int i in c)
        {
            num+=i*multiplier;
            multiplier*=3;
        }
        return num;
    }

    private static void XORSumW(int a, int b)
    {
        List<int> adig=split(a);
        int i;
        for(i=0;padW(adig,split(i))!=b;i++);
        Console.WriteLine(i);
    }
}


using System;
using System.Text.RegularExpressions;

class Program
{
 static void Main(string[] args)
    {
      int n = int.Parse(Console.ReadLine());
      string num = Console.ReadLine();
      int result = 0;
      int test = 0;
      foreach (Match m in Regex.Matches(num, "8"))
        result++;
          if ( n >= 11)
            {
                int buf = 0;
                for (int i = 0; i < result; i++)
                {
                    if (buf + 11 <= n)
                    {
                        test++;
                        buf += 11;
                    }
                    else
                        break;
                }

            }
            else
                test = 0;

                Console.WriteLine(test);


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

namespace EhWasByDetstvoVspomnit
{

    class Program
    {
        private static int[] ReadIntArray => Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        private static long[] ReadLongArray => Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
        private static char[] ReadCharArray => Console.ReadLine().Split(' ').Select(char.Parse).ToArray();
        private static string[] ReadStringArray => Console.ReadLine().Split(' ').Select(str => str).ToArray();
        private static int ReadInt => int.Parse(Console.ReadLine());
        private static long ReadLong => long.Parse(Console.ReadLine());
        private static string ReadString => Console.ReadLine();
        struct Point
        {
            public string s;
            public int i;
            public Point(int i, string s)
            {
                this.i = i;
                this.s = s;
            }
        }
        static void Main()
        {
            Console.ReadLine();
            string str = Console.ReadLine();

            int length = str.Length;

            int l = str.Where(a => a == '8').Count();

            int ans = 0;
            while (length >= 11 && l > 0)
            {
                ans++;
                length -= 11;
                l--;
            }

            Console.WriteLine(ans);

            Console.ReadLine();
        }

    }
}


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

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

            int[] mas = new int[n];
            for(int i = 0;i<3;i++)
            {
                mas[i] = int.Parse(Console.ReadLine());
            }

            n--;
            int distance = 0;
            int curent = 0;
            while(n>0)
            {
                if(curent==0)
                {
                    if (mas[0] > mas[1])
                    {
                        curent = 1;
                        distance += mas[1];
                        n--;
                        continue;
                    }
                    else
                    {
                        curent = 2;
                        distance += mas[0];
                        n--;
                        continue;
                    }
                }

                if (curent == 1)
                {
                    if (mas[1] > mas[2])
                    {
                        curent = 2;
                        distance += mas[2];
                        n--;
                        continue;
                    }
                    else
                    {
                        curent = 0;
                        distance += mas[1];
                        n--;
                        continue;
                    }
                }

                if (curent == 2)
                {
                    if (mas[0] > mas[2])
                    {
                        curent = 1;
                        distance += mas[2];
                        n--;
                        continue;
                    }
                    else
                    {
                        curent = 0;
                        distance += mas[0];
                        n--;
                        continue;
                    }
                }
            }

            Console.WriteLine(distance);

        }
    }
}


using system;
class program
{
         static void Main(string[] args)
        {
            string s = Console.ReadLine();
            if (s.Count() % 2 ==0)
                Console.WriteLine("CHAT WITH HER");
            else
                Console.WriteLine("IGNORE HIM");
        }
}


using System;

public class Test
{
	public static void Main()
	{
		var x = int.Parse(Console.ReadLine());

		var a = Convert.ToString(x, 2).PadLeft(6, '0').ToArray();

		var temp = a[0];
		a[0] = a[4];
		a[4] = temp;
		temp = a[1];
		a[1] = a[2];
		a[2] = temp;

		Console.WriteLine(Convert.ToInt32(new String(a), 2));

	}
}


using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		var x = int.Parse(Console.ReadLine());

		var a = Convert.ToString(x, 2).PadLeft(6, '0').ToArray();

		var temp = a[0];
		a[0] = a[4];
		a[4] = temp;
		temp = a[1];
		a[1] = a[2];
		a[2] = temp;

		Console.WriteLine(Convert.ToInt32(new String(a), 2));

	}
}


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

namespace Kerling
{
    class Program
    {
        static void Main(string[] args)
        {
            A_Card();
        }

        static void A_Card()
        {
            string cards = Console.ReadLine();
            char[] glas = {'a', 'e', 'i', 'o', 'u','0','2','4','6','8'};

            int count = 0;
            foreach (char c in cards)
            {
                foreach(char g in glas){
                    if (c == g) count++;
                }
            }

            Console.Write(count.ToString());
            Console.WriteLine();
        }

    }
}


using System;
using System.Linq;

namespace Новый_год_и_количество_карт
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] searchTarget = new char[] { 'a', 'e', 'i', 'o', 'u','y' };
            int flipNumber = Console.ReadLine().Where(x => searchTarget.Contains(x)).ToArray().Length;
            Console.WriteLine(flipNumber);

            Main(null);
        }
    }
}


using System;

class Program
{
    static void Main()
    {
        string[] input = Console.ReadLine().Split();

        int result = int.Parse(input[0]);
        int time = int.Parse(input[1]);
        int cost1 = int.Parse(input[2]);
        int cost2 = int.Parse(input[3]);
        int lose1 = int.Parse(input[4]);
        int lose2 = int.Parse(input[5]);

        bool answer = false;

        for (int time1 = 0; time1 < time && !answer; time1++)
        {
            int points1 = cost1 - time1 * lose1;
            if (points1 == result)
                answer = true;

            for (int time2 = 0; time2 < time && !answer; time2++)
            {
                int points2 = cost2 - time2 * lose2;
                if (points2 == result || points1 + points2 == result)
                    answer = true;
            }
        }

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


<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{CA6A81DF-7A9D-4F45-B787-3949DAC10116}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Codeforces128div2</RootNamespace>
    <AssemblyName>Codeforces128div2</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>


using System; using System.Linq;

class P {
  static void Main () {

    var strs = new [] {
"George Washington, 1789-1797                                                           ",
"John Adams, 1797-1801                                                                ",
"Thomas Jefferson, 1801-1809                                                         ",
"James Madison, 1809-1817                                                           ",
"James Monroe, 1817-1825                                                          ",
"John Quincy Adams, 1825-1829                                                   ",
"Andrew Jackson, 1829-1837                                                    ",
"Martin Van Buren, 1837-1841                                                ",
"William Henry Harrison, 1841                                             ",
"John Tyler, 1841-1845                                                  ",
"James Knox Polk, 1845-1849                                            ",
"Zachary Taylor, 1849-1850                                           ",
"Millard Fillmore, 1850-1853                                       ",
"Franklin Pierce, 1853-1857                                      ",
"James Buchanan, 1857-1861                                     ",
"Abraham Lincoln, 1861-1865                                  ",
"Andrew Johnson, 1865-1869                                 ",
"Ulysses S. Grant, 1869-1877                             ",
"Rutherford Birchard Hayes, 1877-1881                  ",
"James Abram Garfield, 1881                          ",
"Chester Alan Arthur, 1881-1885                    ",
"Grover Cleveland, 1885-1889                     ",
"Benjamin Harrison, 1889-1893                  ",
"Grover Cleveland, 1893-1897                 ",
"William McKinley, 1897-1901               ",
"Theodore Roosevelt, 1901-1909           ",
"William Howard Taft, 1909-1913        ",
"Woodrow Wilson, 1913-1921           ",
"Warren Gamaliel Harding, 1921-1923",
"Calvin Coolidge, 1923-1929      ",
"Herbert Clark Hoover, 1929-1933",
"Franklin Delano Roosevelt, 1933-1945",
"Harry S. Truman, 1945-1953          ",
"Dwight David Eisenhower, 1953-1961    ",
"John Fitzgerald Kennedy, 1961-1963      ",
"Lyndon Baines Johnson, 1963-1969          ",
"Richard Milhous Nixon, 1969-1974            ",
"Gerald Rudolph Ford, 1974-1977                ",
"James Earl Carter, Jr., 1977-1981               ",
"Ronald Wilson Reagan, 1981-1989                   ",
"George Herbert Walker Bush, 1989-1993               ",
"William Jefferson Clinton, 1993-2001                  ",
"George Walker Bush, 2001-2009                          ",
"Barack Hussein Obama, 2009-                              ",
    var n = int.Parse(Console.ReadLine());
    var s = strs[n-1].Split(',')[0].Split(' ').Last();

    Console.Write(s);
  }
}


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

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int res = 0;
            for (int i = 1; i <= n; i++)
                for (int j = i; j <= n; j++)
                    for (int k = j; k <= n; k++)
                        if (Math.Pow(i, 2) + Math.Pow(j, 2) == Math.Pow(k, 2)) res++;
            Console.Write(res.ToString());
        }
    }
}


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

namespace ConsoleApplication30
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            int n = ReadInt();
            int counter = 0;
//            int n = (int)Math.Ceiling(Math.Sqrt(t));
            for (int a = 1; a <= n; a++)
            {
                for (int b = a; b <= n; b++)
                {
                    for (int c = b; c <= n; c++)
                    {
                        if (a*a + b*b == c*c)
                        {
                            counter++;
                        }
                    }
                }
            }
            Console.WriteLine(counter);
        }

        #region Reader

        private static string Read()
        {
            return Console.ReadLine();
        }

        private static void Read(out int n1, out int n2)
        {
            string[] input = ReadArray();
            n1 = int.Parse(input[0]);
            n2 = int.Parse(input[1]);
        }

        private static void Read(out int n1, out int n2, out int n3)
        {
            string[] input = ReadArray();
            n1 = int.Parse(input[0]);
            n2 = int.Parse(input[1]);
            n3 = int.Parse(input[2]);
        }

        private static void Read(out int n1, out int n2, out int n3, out int n4)
        {
            string[] input = ReadArray();
            n1 = int.Parse(input[0]);
            n2 = int.Parse(input[1]);
            n3 = int.Parse(input[2]);
            n4 = int.Parse(input[3]);
        }

        private static void Read<T>(out T a1, out T a2)
        {
            string[] input = ReadArray();
            a1 = (T) Convert.ChangeType(input[0], typeof (T));
            a2 = (T) Convert.ChangeType(input[1], typeof (T));
        }

        private static void Read<T>(out T a1, out T a2, out T a3)
        {
            string[] input = ReadArray();
            a1 = (T) Convert.ChangeType(input[0], typeof (T));
            a2 = (T) Convert.ChangeType(input[1], typeof (T));
            a3 = (T) Convert.ChangeType(input[2], typeof (T));
        }

        private static void Read<T>(out T a1, out T a2, out T a3, out T a4)
        {
            string[] input = ReadArray();
            a1 = (T) Convert.ChangeType(input[0], typeof (T));
            a2 = (T) Convert.ChangeType(input[1], typeof (T));
            a3 = (T) Convert.ChangeType(input[2], typeof (T));
            a4 = (T) Convert.ChangeType(input[3], typeof (T));
        }

        private static int ReadInt()
        {
            return Int32.Parse(Read());
        }

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

        private static double ReadDouble()
        {
            return double.Parse(Read(), CultureInfo.InvariantCulture);
        }

        private static T Read<T>()
        {
            return (T) Convert.ChangeType(Read(), typeof (T));
        }

        private static string[] ReadArray()
        {
            string readLine = Console.ReadLine();
            if (readLine != null)
                return readLine.Split(' ');

            throw new ArgumentException();
        }

        private static List<int> ReadIntArray()
        {
            return ReadArray().Select(Int32.Parse).ToList();
        }

        private static List<long> ReadLongArray()
        {
            return ReadArray().Select(long.Parse).ToList();
        }

        private static List<double> ReadDoubleArray()
        {
            return ReadArray().Select(d => double.Parse(d, CultureInfo.InvariantCulture)).ToList();
        }

        private static List<T> ReadArray<T>()
        {
            return ReadArray().Select(x => (T) Convert.ChangeType(x, typeof (T))).ToList();
        }

        private static void WriteLine(int value)
        {
            Console.WriteLine(value);
        }

        private static void WriteLine(double value)
        {
            Console.WriteLine(value.ToString(CultureInfo.InvariantCulture));
        }

        private static void WriteLine(long value)
        {
            Console.WriteLine(value);
        }

        private static void WriteLine(double value, string stringFormat)
        {
            Console.WriteLine(value.ToString(stringFormat, CultureInfo.InvariantCulture));
        }

        private static void WriteLine<T>(T value)
        {
            Console.WriteLine(value);
        }

        private static void Write(int value)
        {
            Console.Write(value);
        }

        private static void Write(double value)
        {
            Console.Write(value.ToString(CultureInfo.InvariantCulture));
        }

        private static void Write(long value)
        {
            Console.Write(value);
        }

        private static void Write(double value, string stringFormat)
        {
            Console.Write(value.ToString(stringFormat, CultureInfo.InvariantCulture));
        }

        private static void Write<T>(T value)
        {
            Console.Write(value);
        }

        #endregion
    }
}


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

namespace CodeForces
{
    class A
    {
        public void Run()
        {
            int n = int.Parse(Console.ReadLine());
            //int[] m = Console.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
            //string str = Console.ReadLine();

            double a = 1, b = 1, c = 1;
            int res = 0;

            for (int i = 1; i <= n; i++)
            {
                for (int j = i; j <= n; j++)
                {
                    for (int k = j; k <= n; k++)
                    {
                        if (Math.Sqrt(Math.Pow(i, 2) + Math.Pow(j, 2)) == k)
                            res++;
                    }
                }

            }

            Console.Write(res);
        }
    }
    class B
    {
        public void Run()
        {
            int[] str = Console.ReadLine().Split(':').Select(a => int.Parse(a)).ToArray();
            int[] str2 = Console.ReadLine().Split(':').Select(a => int.Parse(a)).ToArray();

            DateTime d1 = new DateTime(str[0], str[1], str[2]);
            DateTime d2 = new DateTime(str2[0], str2[1], str2[2]);

            TimeSpan ts = d2 - d1;

            Console.WriteLine(Math.Abs(ts.Days));
        }
    }

    class Programm
    {
        static void Main(string[] args)
        {
            A a = new A();
            a.Run();
        }
    }
}


using System;
ublic class Program
    {
        public static void Main(string[] args)
        {
            string[] input = Console.In.ReadToEnd().Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
            double k = double.Parse(input[0]);
            double l = Math.Log(double.Parse(input[1]), k);
            if (l == Math.Truncate(l)) { Console.WriteLine("YES"); Console.WriteLine((l - 1D)); }
            else Console.WriteLine("NO");
        }
    }


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

namespace ConsoleApplication1
{
    public class Program
    {
        public static void Main()
        {
            int exponential, end_num, power = 0;
            bool found = false;

            int original = Convert.ToInt32(Console.ReadLine());
            end_num = Convert.ToInt32(Console.ReadLine());

            exponential = original;
            while (exponential <= end_num)
            {
                if (exponential == end_num)
                {
                    found = true;
                    break;
                }
                exponential *= original;
                ++power;
            }

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


using System;
class Program
{
    static void Main()
    {
        var k = int.Parse(Console.ReadLine());
        var l = int.Parse(Console.ReadLine());
        var p = 0;
        while (k < l)
        {
            k *= k;
            p++;
        }
        if (k == l)
        {
            Console.WriteLine("YES");
            Console.WriteLine(p);
        }
        else
        {
            Console.WriteLine("NO");
        }
    }
}


using System;

namespace AllProblems
{
    class Program
    {
        static void Main(string[] args)
        {
            _114A_Cifera.Run();

        }
    }
    class _114A_Cifera
    {
        public static void Run()
        {
            var n = uint.Parse(Console.ReadLine().Trim());
            var m = uint.Parse(Console.ReadLine().Trim());
            var p = n;

            if (p == m)
            {
                Console.WriteLine("YES\n0");
                return;
            }

            uint ctr = 0;
            while (p < m)
            {
                p *= n;
                ++ctr;
                if (p != m) continue;
                Console.WriteLine("YES\n" + ctr);
                Console.ReadLine();
                return; ;
            }

            Console.WriteLine("NO");
            Console.ReadLine();
        }
    }
}


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

namespace a2oj
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] str = s.Split(' ');
            long n, m;
            n = long.Parse(str[0]);
            m = long.Parse(str[1]);

            long[] teams = new long[m];
            long t = n / m;
            long remain = n % m;
            for (int i = 0; i < m; i++)
            {
                teams[i] = t;
                if(remain>0)
                {
                    teams[i]++;
                    remain--;
                }
            }
            long min = 0, max = (n - (m - 1)) * (n - (m - 1)-1)/2;

            for (int i = 0; i < m; i++)
            {
                min += teams[i] * (teams[i] - 1) / 2;
            }

            Console.WriteLine(min + " " + max);

            //Console.ReadLine();

        }
    }
}


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

namespace CodeForces
{
   class B
   {
      static void Main(string[] args)
      {
         long n = long.Parse(Console.ReadLine());
         long k = long.Parse(Console.ReadLine());

         long A = long.Parse(Console.ReadLine());
         long B = long.Parse(Console.ReadLine());

         long X = n;

         long ans = 0;

         while(X>1){
           if(X%k!=0){
             ans += A;
             X--;
           }else{
             long val = X/k;
             if((X-val)*A>B){
               ans += B;
               X /= k;
             }else{
               ans += A;
               X--;
             }
           }
         }

         Console.WriteLine(ans);
      }
   }
}


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

namespace ConsoleApplication2
{
    class Program
    {

        static void Main(string[] args)
        {
            long n = Convert.ToInt64(Console.ReadLine()), k = Convert.ToInt64(Console.ReadLine()), a = Convert.ToInt64(Console.ReadLine()), b = Convert.ToInt64(Console.ReadLine());
            long  ans = 0;
            while ( n!=1)
            {
                if ( n%k!=0 && n/k!=0)
                {
                    ans+= n % k * a;n -= n % k;
                }
                else if ( n<k)
                {
                    ans += ((n - 1) * a);
                    n = 1;
                }
                else
                {
                    if ( b <= a*(n-(n/k)))
                    {
                        ans += b;n/=k;
                    }
                    else
                    {
                        ans += a * (n - (n / k)); n /= k;
                    }
                }

            }
            Console.WriteLine(ans);
        }
    }
}


using System;

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

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

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

            var i = 1;
            for (; Math.Pow(2, i) < n; i += 1) ;

            var power = Math.Pow(2, i);

            if (power - i >= n)
            {
                Console.WriteLine(i*2 - 1);
                return;
            }
            else
            {
                Console.WriteLine(i*2);
                return;
            }
        }
    }
}


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

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine()), ans=0;
            string txt = Console.ReadLine();
            string[] duo = txt.Split(' ');
            if (duo[0] == "1")
                ans++;
            for ( int i=1; i<n;i++)
            {
                if (duo[i] == "0" && duo[i - 1] == "0" || i==n-1 && duo[i]=="0")
                { ans--;
                    if (i - 2 >= 0 && duo[i - 2] == "0")
                        ans++;
                }
                else ans++;
            }
            if ( ans<0)
                ans=0
            Console.WriteLine(ans);
        }
    }
  }


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)
        {
            int[] sa = Console.ReadLine().Split().Select(x1 => int.Parse(x1)).ToArray();
            int a = sa[0], b = sa[1], c = sa[2];
            int q = a * b + c, w = a * b * c;
            int t=(a+b)*c,y=(b+c)*a,i=a+b+c;
            Console.WriteLine(Math.Max(Math.Max(q,w),Math.Max(t,Math.Max(y,i))));
        }
    }
}


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

class Program {
	static int[] d = new int[1000001];
	static void Main() {
		string[] input = Console.ReadLine().Split();
		int a = int.Parse(input[0]);
		int b = int.Parse(input[1]);
		int c = int.Parse(input[2]);
		long s = 0;

		for(int i = 1; i <= a; i++){
			for(int j = 1; j <= b; j++){
				for(int k = 1; k <= c; k++){
					s += divisor(i * j * k) % 1073741824 ;
				}
			}
		}
		Console.WriteLine(s);
	}
	static int divisor(int n) {
		if(n == 1)
			return 1;
		if(d[n] != 0){
			return d[n];
		}
		int c = 2;
		for(int i = 2; i < n; i++){
			if(n % i == 0)
				c++;
		}
		d[n] = c;
		return d[n];
	}
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] sint = s.Split(' ');

            int a = int.Parse(sint[0]);
            int b = int.Parse(sint[1]);
            int c = int.Parse(sint[2]);
            int sum = 0;
            int[] mas = new int[a * b * c+1];
            for (int i = 1; i <= a; i++)
            {
                for (int j = 1; j <= b; j++)
                {
                    for (int k = 1; k <= c; k++)
                    {
                        mas[i * j * k]++;
                    }
                }
            }
            for (int i = 1; i <= a*b*c; i++)
            {
                if (mas[i] != 0)
                {
                    sum += mas[i ] * Delitel(i );
                }

            }
            double res = (double)sum;
            Console.WriteLine("{0}", res % 1073741824);

        }

        public static int Delitel(int a)
        {
            int res;
            if (a == 1)
            {
                res = 1;
            }
            else
            {
                res = 2 ;
            }

            for (int i = 2; ((i <= (a/ 2 + 1)) && (i != a )); i++)
            {
                if (a % i == 0)
                {
                    res++;
                }
            }
            return res;
        }
    }
}


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

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            float Aux = 1,Sum = 0;
            int[] abc = Console.ReadLine().Split().Select(x => Convert.ToInt32(x)).ToArray();
            int a = abc[0];
            int b = abc[1];
            int c = abc[2];
            for (int i = 1; i <= a; i++)
            {
                Aux = 1;
                for (int j = 1; j <= b; j++)
                {
                    for (int k = 1; k <= c; k++)
                    {
                        Aux = i * j * k;
                        Sum += Divisores(Aux);
                    }
                }
            }
            Console.WriteLine(Sum);
        }

        public static float Divisores(float Num)
        {
            float count = 0;
            for (int i = 1; i <= Num; i++)
            {
                if (Num % i == 0)
                    count++;
            }
            return count;
        }
    }
}