using System;
namespace Dictionary
{
    class Program
    {

        static void Main(string[] args)
        {
            char[] m = new char[] { 'h', 'e', 'l', 'l', 'o' };
            string s = Console.ReadLine();
            int count = 0;
            foreach (char c in s)
            {
                if (c == m[count] && count <5) count++;
            }
            Console.Write(count == 5 ? "YES" : "NO");
        }

    }
}


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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string BaseWord = "hello";
            string s = Console.ReadLine().ToLower();
            int i = 0;
            string temp = string.Empty;
            for (int j = 0; j < BaseWord.Length; j++)
            {
                for (; i < s.Length; i++)
                {

                    if (BaseWord[j] == s[i])
                    {
                        temp += i + ",";
                        i++;
                        break;
                    }
                }

            }
            temp = temp.Remove(temp.Length - 1);
            int[] indexes = Array.ConvertAll(temp.Split(','), int.Parse);

            if (indexes.Length != 5)
            {
                Console.WriteLine("NO");
            }
            else
            {
                Console.WriteLine(checkedIfSorted(indexes, indexes.Length) ? "YES" : "NO");

            }

        }

        public static bool checkedIfSorted(int[] arr, int length)
        {

            if (length == 0 || length == 1)
            {
                return true;
            }

            if (arr[length - 2] > arr[length - 1])
            {

                return false;
            }

            return checkedIfSorted(arr, length - 1);

        }
    }
}


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

namespace Problem777A
{
    class Program
    {
        static void Swap(ref bool a, ref bool b)
        {
            bool temp = a;
            a = b;
            b = temp;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int x = int.Parse(Console.ReadLine());
            bool[] shells0 = new bool[3];
            shells0[0] = true;
            bool[] shells1 = new bool[3];
            shells1[1] = true;
            for (int i = 0; i < n; i++)
            {
                if (i % 2 == 0)
                {
                    Swap(ref shells0[0], ref shells0[1]);
                    Swap(ref shells1[0], ref shells1[1]);
                }
                else
                {
                    Swap(ref shells0[1], ref shells0[2]);
                    Swap(ref shells1[1], ref shells1[2]);
                }
            }
            if (shells0[x] == true)
                Console.Write(0);
            else if (shells1[x] == true)
                Console.Write(1);
            else
                Console.Write(2);
            //Console.ReadLine();
        }
    }
}


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

namespace ConsoleApplication11
{
    class Program
    {
        static void Main(string[] args)
        {
            Int64 move = new Int64();
            move = Convert.ToInt64(Console.ReadLine());
            int x = Convert.ToInt32(Console.ReadLine());
            int pose = x;

            while(move!=0)
            {
                if (move % 2 == 0)
                {
                    if (pose == 2)
                        pose = 1;
                    else if (pose == 1)
                        pose = 2;
                }
                else if (move % 2 == 1)
                {
                    if (pose == 1)
                        pose = 0;
                    else if (pose == 0)
                        pose = 1;
                }
                move--;
            }

            Console.WriteLine(pose);
        }
    }
}


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

namespace CF
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
			{
				//using (var sw = new StreamWriter("output.txt")) {
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var n = sr.NextInt32();
			var x = sr.NextInt32();
			n = n % 6;
			for (var i = 0; i < 2; i++) {
				var curr = i;
				for (var j = 1; j <= n; j++) {
					if (j % 2 == 1) {
						if (curr == 0)
							curr = 1;
						else {
							if (curr == 1) {
								curr = 0;
							}
						}
					}
					if (j % 2 == 0) {
						if (curr == 1)
							curr = 2;
						else {
							if (curr == 2) {
								curr = 1;
							}
						}
					}
				}

				if (curr == x) {
					sw.WriteLine(i);
					return;
				}
			}

			throw new InvalidOperationException();
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
						.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
						.Select(s => func(s, CultureInfo.InvariantCulture))
						.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
						str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
										.Select(s => func(s, CultureInfo.InvariantCulture))
										.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose)
		{
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}


using System;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            byte [] p = {0,0,0};

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

            p[int.Parse(Console.ReadLine())] = 1;

            byte tmp;

            for(int i = n; i >= 1; i--)
            {
                    tmp = p[0 + (1 - i % 2)];
                    p[0 + (1 - i % 2)] = p[1 + (1 - i % 2)];
                    p[1 + (1 - i % 2)] = tmp;
            }

            Console.WriteLine(p[0] == 1 ? 0 : (p[1] == 1 ? 1 : 2));
        }
    }
}


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

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

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

            int result = x;

            for(int i = n; i > 0; i--)
            {
                if (i % 2 == 0)
                {
                    if (result == 2)
                    {
                        result = 1;
                    }
                    else if (result == 1)
                    {
                        result = 2;
                    }
                }
                else
                {
                    if (result == 1)
                    {
                        result = 0;
                    }
                    else if (result == 0)
                    {
                        result = 1;
                    }
                }
            }

            Console.WriteLine(result);
        }
    }
}


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

namespace ConsoleApplication1.Combynatorycs
{
    class _776
    {
        static void Main(String[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var x = int.Parse(Console.ReadLine());
            for(var i = n; i >= 1; i--)
            {
                if (i % 2 == 0)
                {
                    if (x == 2)
                    {
                        x = 1;
                    } else if (x == 1)
                    {
                        x = 2;
                    }
                } else
                {
                    if (x == 0)
                    {
                        x = 1;
                    } else if (x == 1)
                    {
                        x = 0;
                    }
                }
            }
            Console.WriteLine(x);
        }
    }
}


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)
        {
            // String text = Console.ReadLine();
            //String[] nums = text.Split();
            int count = Convert.ToInt32(Console.ReadLine());
            int index =Convert.ToInt32(Console.ReadLine());
            int[] myArray = new int[3];
            myArray[0] =0 ;
            myArray[1] =1;
            myArray[2] = 2;
            int sum = 0;
            for (int i = 0; i < count; i++)
            {

                if ( i % 2 == 0)
                {
                    sum = myArray[0] + myArray[1];
                    myArray[0] = sum - myArray[0];
                    myArray[1] = sum - myArray[0];

                }
                else if ( i % 2 != 0)
                {
                    sum = myArray[1] + myArray[2];
                    myArray[1] = sum - myArray[1];
                    myArray[2] = sum - myArray[1];
                }

            }
            Console.WriteLine(myArray[index]);

        }

    }

   }


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

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

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

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

            int[] arr = new int[3];

            arr[0] = 0;
            arr[1] = 1;
            arr[2] = 2;

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

                if(i % 2!=0)
                {
                    //kkk
                    int temp = arr[0];
                    arr[0] = arr[1];
                    arr[1] = temp;

                }
                else
                {

                    int temp = arr[1];
                    arr[1] = arr[2];
                    arr[2] = temp;
                }

            }

            Console.WriteLine(arr[lastind]);
          //  Console.ReadLine();

        }
    }
}


using System;
namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = int.Parse(Console.ReadLine());
            string rez = "";
            while (count > 0)
            while (count != 0)
            {
                int a = (int)Math.Log(count,2);
                int ch = (int)Math.Pow(2, a);
                count -= ch;
                rez += ch + " " ;
            }
            Console.WriteLine(rez);
        }
    }
}


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

namespace _58A.Chat_room
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] typed = Console.ReadLine().ToCharArray();
            char[] hello = "hello".ToCharArray();
            if (anlz(typed, hello))
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");

        }
        static bool anlz(char[]t ,char[]h)
        {
            int k = 0;
            for (int i = 0; i < h.Length; i++)
            {
                for (int j = k; j < t.Length; j++)
                {
                    if (h[i] == t[j])
                    {
                        k = j + 1;
                        break;
                    }
                    else if (j + 1 >= t.Length && h[k] != t[i])
                        return false;
                }

            }
            return true;
        }
    }
}


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

namespace Free_Cash_237A
{
    class Program
    {
        static void Main(string[] args)
        {
            var num = int.Parse(Console.ReadLine());
            int max=1;
            int currentCount = 1;
            string previous = "abc";
            for (int i = 0; i < num; i++)
            {
                var current = Console.ReadLine();
                if (current.Equals(previous))
                {
                    currentCount++;
                    max = Math.Max(max, currentCount);
                }
                else
                {
                    currentCount = 1;
                    previous = current;
                }
            }
            Console.WriteLine(max);
        }
    }
}


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

namespace HELLO
{
    class Program
    {
        static void Main(string[] args)
        {
            string need = "hello";
            string str1 = Console.ReadLine();
            int k = 0;
            foreach (char a in str1)
            {
                if (a == need[k])
                    k++;
            }
            if (k == 5)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }
}


using System; using System.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var a = s[0]; var b = s[1]; var c = s[2];
    var res = c * (a+b-1) + b - 1;
    Console.Write(res);
  }
}


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

namespace PracticeForDummies
{
    class Program
    {
        static void Main(string[] args)
        {
            int weight = int.Parse(Console.ReadLine());
            for ( int i=1; i<=weight; i++)
            {
                if ((weight % i == 0)
                Console.WriteLine("YES");
                else
                Console.WriteLine("NO");

            }
        }
    }
}


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

 namespace Dcoder
 {
 	public class Program
 	{
 		public static void Main(string[] args
 			{
 			int A;
 			A=int.Parse(Console.ReadLine());
 			if(A%2==0)
 			{
 				Console.WriteLine("YES");
 			}
 			else if(A<=2)
 			{
 				Console.WriteLine("NO");
 			}
 			else
 			{
 				Console.WriteLine("NO");
 			}
 			Console.ReadKey(true);
 		}
 	}
 }


class Program
    {
        static void Main(string[] args)
        {
            int n = Console.Read();
            if (n % 2 == 0)
            {
                if ((n / 2) % 2 == 0)
                    Console.WriteLine("YES");
                else
                    Console.WriteLine("NO");
            }
            else
                Console.WriteLine("NO");
        }
    }


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

//namespace A.Арбуз
//{
    class Program
    {
        static void Main()
        {
            int w = int.Parse(Console.ReadLine());

            if (w == 2 || w == 1)
            {
                Console.WriteLine("NO");
                return;
            }

            if (w % 2 != 0)
            {
                Console.WriteLine("NO");
            }

            else
            {
                if ((w / 2) % 2 == 0)
                {
                    Console.WriteLine("YES");
                }
            }
        }
    }
//}


namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = int.Parse(Console.ReadLine());
            if (x <= 100 & x >= 1)
            {
                if (x % 2 == 0 & x!=2)
                {

                        Console.WriteLine("yes");

                }
                else
                {
                    Console.WriteLine("no");
                }
            }
            else
            {
                Console.WriteLine("no");
            }

        }
    }
}


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

class Startup
{
    static void Main()
    {
        int total = int.Parse(Console.ReadLine());
        if(total == 2) {
            Console.WriteLine("NO");
            break;
        }
        Console.WriteLine(total % 2 == 0 ? "YES" : "NO" );
    }

}


using System;

public class Program
{
	public static void Main(string[] args)
	{
		var input = int.Parse(System.IO.File.ReadAllText(args[1]));
		Console.Writeline(input % 2 == 0 ? "YES" : "NO");
	}
}


using System;

public class Program
{
	public static void Main(string[] args)
	{
		var input = int.Parse(System.IO.File.ReadAllText(args[1]));
		Console.WriteLine(input % 2 == 0 ? "YES" : "NO");
	}
}


using System;

public class Program
{
	public static void Main()
	{
        Console.WriteLine("Enter weight: ");
        string input = Console.ReadLine();
        int number;
		int half;
        Int32.TryParse(input, out number);
		if (number <= 2 )
		{
		   Console.WriteLine ("NO");
		}

		    else if(number % 2 == 0 )
			{

				   Console.WriteLine ("YES");
			   }

				else
		    Console.WriteLine ("NO");

		}

		}
}


using System;

public class Test
{
	public static void Main()
	{
		string s=Console.ReadLine();
		string[] values=s.Split(' ');
		int a=int.Parse(values[0]);
		int b=int.Parse(values[1]);
		string str=Console.ReadLine();
		string lower=str.ToLower();
		int l=lower.Length;
		char[] array=new char[l];
		for(int i=0;i<l;i++)
		{
			array[i]=lower[i];
		}
		Array.Sort<char>(array);
		int count=1;
		bool joy=false;
		for(int j=1;j<l;j++)
		{
		 if(array[j]!=array[j-1])
		 {
		 	count=1;
		 }
		 else
		 {
		 	count++;
		 	if(count>b)
		 	{
		 	  joy=false;
		 	}
		 }
		}
		if(joy==false)
		{
			Console.WriteLine("NO");
		}
		else
		{
			Console.WriteLine("YES");
		}

	}
}


using System;

namespace Program
{
	public class MainMethod
	{
		public static void Main(string[] args)
		{
			bruteForce();
		}

		private static void bruteForce()
		{
			var input = Console.ReadLine().Split(' ');
			var ballons = int.Parse(input[0]);
			if (ballons == 0)
				Console.WriteLine("YES");
			var friends = int.Parse(input[1]);
			var colors = Console.ReadLine();
			string[] eachFriendBallon = new string[friends];
			var friendIndex = 0;
			var lastAllocation = 0;
			for (var i = 0; i < ballons; i++)
			{
				if (friendIndex >= friends)
					friendIndex = 0;

				if (eachFriendBallon[friendIndex] == null)
					eachFriendBallon[friendIndex] = "";

				if(lastAllocation>friends)
					break;

				if (eachFriendBallon[friendIndex].IndexOf(colors[i]) == -1)
				{
					eachFriendBallon[friendIndex] += colors[i];
					lastAllocation = 0;
				}
				else
				{
					i--;
					lastAllocation++;
				}

				friendIndex++;
			}

			var uniqueAllocated = 0;
			for (var j = 0; j < friends; j++)
			{
				uniqueAllocated += eachFriendBallon[j].Length;
			}

			if (uniqueAllocated == ballons)
			{
				Console.WriteLine("YES");
			}
			else
			{
				Console.WriteLine("NO");
			}
		}
	}
}


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

namespace codeforces_charp
{
    class Program
    {
        static void Main(string[] args)
        {
            Int64 n, c1, c2;
            string s1 = Console.ReadLine();
            string[] s2 = new string[10];
            s2 = s1.Split(' ');
            n = Convert.ToInt64(s2[0]);
            c1 = Convert.ToInt64(s2[1]);
            c2 = Convert.ToInt64(s2[2]);

            //Console.WriteLine(Convert.ToSingle(c2));
            string s3 = Console.ReadLine();

            int i = 0;
            Int64 cnt = 0;
            Int64 ans = 1000000000;
            ans *= ans;
            while (i < n) {
                if (s3[i] == '1'){
                    cnt++;
                }
                ++i;
            }
            i = 1;
            while (i <= cnt)
            {
                Int64 res = i * c1;
                Int64 ost = n - i;
                Int64 exist = ost / i;
                Int64 big = ost % i;
                Int64 small = i - big;
                res += c2 * (small * exist * exist + big * (exist + 1) * (exist + 1));
                if (ans > res)
                {
                    ans = res;
                }
                //ans = min(ans, res);
                ++i;
            }
            Console.WriteLine(Convert.ToSingle(ans));
        }
    }
}


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

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
           int n = Convert.ToInt32(Console.ReadLine());
           int esPrimo = 0;
           int menor=n-1;
           int div=1;
           int result=n;
           int div1=1;

            for(int i=1;i<n+1;i++){
                if(n%i==0)
                    esPrimo++;
            }
            if(esPrimo==2){
                Console.WriteLine("1"+" "+n);
            }else{
                while(div<result){
                    if(n%div==0){
                        result=n/div;
                        if(result<=menor){
                            menor=result;
                            div1=div;
                        }
                        div++;
                    }else{
                        div++;
                    }
                }
                Console.WriteLine(div1+" "+menor);
            }
        }
    }
}


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

namespace ConsoleApplication3
{
    class Program
    {

        private static string LOCALHOST = "localhost";
        private static int PORT = 60123;

        static void Main(string[] args)
        {

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

            int a = (int) Math.Sqrt(n);

            for (int i = a; i >= 1; i--)
            {
                if (n % a == 0)
                {
                    Console.WriteLine("{0} {1}", a, n / a);
                    break;
                }
            }

            /*
            List<string> list = new List<string>();
            list.Add("giorga");
            list.Add("akela");
            Console.WriteLine("{0} {1}", list[0], list[1]);
            var orderedList = list.OrderBy(name => name[0]);
            foreach (var name in orderedList)
            {
                Console.Write(name);
                Console.Write(" ");
            }

            Console.ReadLine();

            // server
            //IPHostEntry hostInfo = Dns.GetHostEntry(IP_ADDRESS);
            IPAddress ip = Dns.Resolve(IP_ADDRESS).AddressList[0];
            TcpListener server = new TcpListener(ip, PORT);
            Console.WriteLine(server.LocalEndpoint);
            server.Start();
            TcpClient client = server.AcceptTcpClient();
            NetworkStream stream = client.GetStream();
            byte[] received = new byte[100000];
            stream.Read(received, 0, client.ReceiveBufferSize);
            string messageFromClient = Encoding.ASCII.GetString(received);
            Console.WriteLine(messageFromClient);
            byte[] sent = Encoding.ASCII.GetBytes("es mivige bliad: " + messageFromClient);
            stream.Write(sent, 0, client.SendBufferSize);
            stream.Flush();
            */

        }
    }
}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
public class Source
{
    public void Program()
    {

    }
    void Read()
    {
        int n = ri();
        writeLine(1 + " " + n);
    }

    #region hide it
    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
            reader = new StreamReader(Console.OpenStandardInput());
            writer = new StreamWriter(Console.OpenStandardOutput());
            //reader = new StreamReader("input.txt");
            //writer = new StreamWriter("output.txt");
#endif
        var source = new Source();
        source.Read();
        source.Program();

        /* try
         {
             new Source().Program();
         }
         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 ri() { return int.Parse(ReadToken()); }
    public static char ReadChar() { return char.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static ulong ReaduLong() { return ulong.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(i => int.Parse(i)).ToArray(); }
    public static char[] ReadCharArray() { return ReadAndSplitLine().Select(i => char.Parse(i)).ToArray(); }
    public static char[] SplitToChar() { string s = ReadToken(); char[] r = new char[s.Length]; for (int i = 0; i < s.Length; i++) r[i] = s[i]; return r; }
    public static byte[] SplitToByte() { string s = ReadToken(); byte[] r = new byte[s.Length]; for (int i = 0; i < s.Length; i++) r[i] = (byte)s[i]; return r; }
    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 char[][] ReadCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadCharArray(); 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 write<T>(T value) { writer.Write(value); }
    public static void writeLine<T>(T value) { writer.WriteLine(value); }
    public static void writeArray<T>(T[] array, string split) { for (int i = 0; i < array.Length; i++) { write(array[i] + split); } }
    public static void writeMatrix<T>(T[][] matrix, string split) { for (int i = 0; i < matrix.Length; i++) { writeArray(matrix[i], split); writer.Write("\n"); } }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion

    #region Methods
    #region DSU
    public void MakeSet(int[] poi)
    {
        for (int i = 0; i < poi.Length; i++)
        {
            poi[i] = i;
        }
    }
    public int Find(int x, int[] poi)
    {
        if (poi[x] == x) return x;
        return poi[x] = Find(poi[x], poi);
    }
    Random rand = new Random();
    public void Unite(int x, int y, int[] poi)
    {
        y = Find(y, poi);
        x = Find(x, poi);
        if (rand.Next() % 2 == 0)
            Swap(ref x, ref y);
        poi[x] = y;
    }
    #endregion

    class Deque<T>
    {
        T[] array;
        int start, length;
        public Deque()
        {
            start = 0; length = 0; array = new T[1];
        }
        public T this[int index] { get { return array[(start + index) % array.Length]; } set { array[(start + index) % array.Length] = value; } }
        int last { get { return (start + length) % array.Length; } }
        /// <summary>
        /// ÃÆÃ¢â¬ËÃâÃÂÃÆÃ¢â¬ËÃÂ¢Ã¢âÂ¬Ã
        /// </summary>
        public T PeekFirst()
        {
            return array[start];
        }
        public int Count { get { return length; } }
        /// <summary>
        /// ÃÆÃÂÃâÃÂºÃÆÃÂÃâÃÂ¾ÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂµÃÆÃ¢â¬ËÃÂ¢Ã¢âÂ¬  ÃÆÃÂÃâÃÂ±ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ· ÃÆÃ¢â¬ËÃâ Ã¢â¬â¢ÃÆÃÂÃâÃÂ´ÃÆÃÂÃâÃÂ°ÃÆÃÂÃâÃÂ»ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂ¸ÃÆÃ¢â¬ËÃâÃÂ
        /// </summary>
        public T PeekLsat()
        {
            return array[last];
        }
        public T PopLast()
        {
            if (length == 0)
                throw new IndexOutOfRangeException("OutOfRange");
            length--;
            return array[last];
        }
        public T PopFirst()
        {
            if (length == 0)
                throw new IndexOutOfRangeException("OutOfRange");
            length--;
            if (start >= array.Length - 1) start = 0; else start++;
            return array[start - 1 < 0 ? array.Length - 1 : start - 1];
        }
        public void AddFirst(T value)
        {
            IncreaseAndInspection();
            if (start <= 0) start = array.Length - 1; else start--;
            array[start] = value;
            length++;
        }
        public void AddLast(T value)
        {
            IncreaseAndInspection();
            array[last] = value;
            length++;
        }
        bool overflow { get { return length == array.Length; } }
        void IncreaseAndInspection()
        {
            if (overflow)
                increase();

        }
        void increase()
        {
            T[] array2 = new T[array.Length * 2];
            for (int i = 0; i < array.Length; i++)
            {
                int pos = (start + i) % array.Length;
                array2[i] = array[pos];
            }
            array = array2;
            start = 0;
            array2 = null;
        }
        public void Clear()
        {
            start = 0; length = 0; array = new T[1];
        }
    }
    class Heap<T>
    {
        Comparison<T> ic;
        List<T> storage = new List<T>();
        public Heap(Comparison<T> ic)
        {
            this.ic = ic;
        }
        public void Add(T element)
        {
            storage.Add(element);
            int pos = storage.Count - 1;
            while (pos != 0 && ic(storage[((int)(pos - 1) >> 1)], element) > 0)
            {
                Swap(storage, pos, ((int)(pos - 1) / 2));
                pos = ((int)(pos - 1) / 2);
            }
        }
        public T Pop()
        {
            T t = storage[0];
            Swap(storage, 0, storage.Count - 1);
            int pos = 0;
            storage.RemoveAt(storage.Count - 1);
            if (Count > 0)
                while (true)
                {
                    T my = storage[pos];
                    if (pos * 2 + 1 >= Count)
                        break;
                    T left = storage[pos * 2 + 1];
                    if (pos * 2 + 2 >= Count)
                    {
                        if (ic(left, my) < 0)
                        {
                            Swap(storage, pos, pos * 2 + 1);
                            pos = pos * 2 + 1;
                        }
                        break;
                    }
                    T right = storage[pos * 2 + 2];
                    if (ic(left, my) < 0 || ic(right, my) < 0)
                    {
                        if (ic(left, right) < 0)
                        {
                            Swap(storage, pos, pos * 2 + 1);
                            pos = pos * 2 + 1;
                        }
                        else
                        {

                            Swap(storage, pos, pos * 2 + 2);
                            pos = pos * 2 + 2;
                        }
                    }
                    else break;
                }
            return t;
        }

        public void Clear()
        {
            storage.Clear();
        }
        /// <summary>
        /// ÃÆÃÂÃâÃÂ±ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ· ÃÆÃ¢â¬ËÃâ Ã¢â¬â¢ÃÆÃÂÃâÃÂ´ÃÆÃÂÃâÃÂ°ÃÆÃÂÃâÃÂ»ÃÆÃÂÃâÃÂµÃÆÃÂÃâÃÂ½ÃÆÃÂÃâÃÂ¸ÃÆÃ¢â¬ËÃâÃÂ
        /// </summary>
        /// <returns></returns>
        public T Peek()
        {
            return storage[0];
        }
        public int Count
        {
            get { return storage.Count; }
        }
        //void RemoveLast, Size, peeklast, add
    }
    static void Swap<T>(ref T lhs, ref T rhs)
    {
        T temp;
        temp = lhs;
        lhs = rhs;
        rhs = temp;
    }
    static void Swap<T>(T[] a, int l, int r)
    {
        T temp;
        temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }
    static void Swap<T>(List<T> a, int l, int r)
    {
        T temp;
        temp = a[l];
        a[l] = a[r];
        a[r] = temp;
    }

    bool outregion(long y, long x, long n, long m)
    {
        if (x < 0 || x >= m || y < 0 || y >= n)
            return true;
        return false;
    }
    static void initlist<T>(ref List<T>[] list, int n)
    {
        list = new List<T>[n];
        for (int i = 0; i < n; i++)
            list[i] = new List<T>();
    }
    static void newarray<T>(ref T[][] array, int n, int m)
    {
        array = new T[n][];
        for (int i = 0; i < n; i++)
            array[i] = new T[m];
    }
    static void newarray<T>(ref T[] array, int n)
    {
        array = new T[n];
    }
    static void fill<T>(T[] array, T value)
    {
        for (int i = 0; i < array.Length; i++)
            array[i] = value;
    }
    static void fill<T>(T[][] array, T value)
    {
        for (int i = 0; i < array.Length; i++)
            for (int j = 0; j < array[i].Length; j++)
                array[i][j] = value;
    }
    public bool NextPermutation<T>(T[] b, Comparison<T> ic)
    {
        for (int j = b.Length - 2; j >= 0; j--)
        {
            if (ic(b[j], b[j + 1]) < 0)
            {
                for (int l = b.Length - 1; l >= 0; l--)
                {
                    if (ic(b[l], b[j]) > 0)
                    {
                        Swap(b, j, l);
                        Array.Reverse(b, j + 1, b.Length - (j + 1));
                        return true;
                    }
                }
            }
        }
        return false;
    }
    int[,] step8 = new int[,]
    {
        {-1,0 },
        {1,0 },
        {0,-1 },
        {0,1 },
        {1,1 },
        {-1,1 },
        {-1,-1 },
        {1,-1 },
    };
    int[,] step4 = new int[,]
    {
        {-1,0 },
        {1,0 },
        {0,-1 },
        {0,1 },
    };
    struct Vector2
    {
        public double x;
        public double y;
        public Vector2(double x, double y)
        {
            this.x = x;
            this.y = y;
        }
        public double Dist(Vector2 to)
        {
            return Math.Sqrt(Math.Abs(Math.Pow(to.x - x, 2)) + Math.Abs(Math.Pow(to.y - y, 2)));
        }
        public static bool operator ==(Vector2 left, Vector2 right) { return left.x == right.x && left.y == right.y; }
        public static bool operator !=(Vector2 left, Vector2 right) { return left.x != right.x || left.y != right.y; }
    }
    #endregion
    #endregion

}


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

namespace _262
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.SetIn(new StreamReader("input.txt"));

            solve_helvetic2019A1();
            //solve_262A();
        }

        public static void solve_helvetic2019A1()
        {
            long r = Convert.ToInt64(Console.ReadLine());

            bool found = false;
            long x = 0;
            long y = 0;
            long xLen = (int)Math.Sqrt(r);
            for (x = 1; x < xLen; x++)
            {
                long yLen = r <= 100000 ? r : r / (2000 * xLen);
                for (y = 1; y < yLen; y++)
                {
                    long h = x * x + 2 * x * y + x + 1;
                    if (h > r)
                    {
                        break;
                    }

                    if (r == h)
                    {
                        found = true;
                        break;
                    }
                }

                if (found)
                {
                    break;
                }
            }

            if (found)
            {
                Console.Write("{0} {1}", x, y);
            }
            else
            {
                Console.Write("NO");
            }
        }

        public static void solve_262A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int bought = n;
            int max = n;
            while (bought > 0)
            {
                bought = max % m == 0 ? (bought + m - 1) / m : bought / m;
                max += bought;
            }
            Console.WriteLine(max);
        }

        /*
1)4
2)1 + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1)
4)1

1 1

2 3

3 7

4 14

5 25

1)5
2)1 + (1 + 1) + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1) + (1 + 1 + 1)
4)1 + (1 + 1 + 1 + 1)
5)1

(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5
         */
        public static void solve_164B()
        {
            int n = Convert.ToInt32(Console.ReadLine());

            int total = 0;
            int prev = 0;
            int prevPrev = 0;
            for (int i = 1; i <= n; i++)
            {
                total = prevPrev + prev + i;

                prevPrev = prev;
                prev = total;
            }

            Console.WriteLine(total);
        }

        /*
        Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.
        То есть надо восстановить, сместив букву влево, то у нас будет исключение.
        Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.
        НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то
        мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.
        То есть такой кейс не рассматривается.

        Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать
        все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.
         */
        public static void solve_271A()
        {
            string direction = Console.ReadLine();
            string text = Console.ReadLine();

            string keyboard = "qwertyuiopasdfghjkl;zxcvbnm,./";

            string answer = String.Empty;
            if (direction == "R")
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) - 1];
                }
            }
            else
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) + 1];
                }
            }

            Console.WriteLine(answer);
        }

        /*
        Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ
        String.Contains.
        и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы
        log(n)
         */
        public static void solve_368A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int count = 0;
            string noir = "WBG";
            for (int i = 0; i < n; i++)
            {
                string[] row = Console.ReadLine().Split(' ');

                for (int j = 0; j < m; j++)
                {
                    if (noir.Contains(row[j]))
                    {
                        count++;
                    }
                }
            }

            string answer =  (count == n * m) ? "#Black&White" : "#Color";

            Console.WriteLine(answer);
        }

        public static void solve_90A()
        {
            string[] abn = Console.ReadLine().Split(' ');

            int a = Convert.ToInt32(abn[0]);
            int b = Convert.ToInt32(abn[1]);
            int n = Convert.ToInt32(abn[2]);

            int count = 1;
            while (n > 0)
            {
                if (count % 2 == 0)
                {
                    n -= gcd(n, b);
                }
                else
                {
                    n -= gcd(n, a);
                }

                count++;
            }

            int answer = (--count % 2 == 0) ? 1 : 0;

            Console.WriteLine(answer);
        }

        public static int gcd(int a, int b)
        {
            if (b == 0)
            {
                return a;
            }

            return gcd(b, a % b);
        }
    }
}


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

namespace _262
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.SetIn(new StreamReader("input.txt"));

            solve_helvetic2019A1();
            //solve_262A();
        }

        public static void solve_helvetic2019A1()
        {
            long r = Convert.ToInt64(Console.ReadLine());

            bool found = false;
            long x = 0;
            long y = 0;
            long xLen = (int)Math.Sqrt(r);
            for (x = 1; x < xLen; x++)
            {
                long yLen = r <= 100000 ? r : r / (2 * xLen);
                for (y = 1; y < yLen; y++)
                {
                    long h = x * x + 2 * x * y + x + 1;
                    if (h > r)
                    {
                        break;
                    }

                    if (r == h)
                    {
                        found = true;
                        break;
                    }
                }

                if (found)
                {
                    break;
                }
            }

            if (found)
            {
                Console.Write("{0} {1}", x, y);
            }
            else
            {
                Console.Write("NO");
            }
        }

        public static void solve_262A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int bought = n;
            int max = n;
            while (bought > 0)
            {
                bought = max % m == 0 ? (bought + m - 1) / m : bought / m;
                max += bought;
            }
            Console.WriteLine(max);
        }

        /*
1)4
2)1 + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1)
4)1

1 1

2 3

3 7

4 14

5 25

1)5
2)1 + (1 + 1) + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1) + (1 + 1 + 1)
4)1 + (1 + 1 + 1 + 1)
5)1

(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5
         */
        public static void solve_164B()
        {
            int n = Convert.ToInt32(Console.ReadLine());

            int total = 0;
            int prev = 0;
            int prevPrev = 0;
            for (int i = 1; i <= n; i++)
            {
                total = prevPrev + prev + i;

                prevPrev = prev;
                prev = total;
            }

            Console.WriteLine(total);
        }

        /*
        Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.
        То есть надо восстановить, сместив букву влево, то у нас будет исключение.
        Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.
        НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то
        мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.
        То есть такой кейс не рассматривается.

        Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать
        все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.
         */
        public static void solve_271A()
        {
            string direction = Console.ReadLine();
            string text = Console.ReadLine();

            string keyboard = "qwertyuiopasdfghjkl;zxcvbnm,./";

            string answer = String.Empty;
            if (direction == "R")
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) - 1];
                }
            }
            else
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) + 1];
                }
            }

            Console.WriteLine(answer);
        }

        /*
        Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ
        String.Contains.
        и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы
        log(n)
         */
        public static void solve_368A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int count = 0;
            string noir = "WBG";
            for (int i = 0; i < n; i++)
            {
                string[] row = Console.ReadLine().Split(' ');

                for (int j = 0; j < m; j++)
                {
                    if (noir.Contains(row[j]))
                    {
                        count++;
                    }
                }
            }

            string answer =  (count == n * m) ? "#Black&White" : "#Color";

            Console.WriteLine(answer);
        }

        public static void solve_90A()
        {
            string[] abn = Console.ReadLine().Split(' ');

            int a = Convert.ToInt32(abn[0]);
            int b = Convert.ToInt32(abn[1]);
            int n = Convert.ToInt32(abn[2]);

            int count = 1;
            while (n > 0)
            {
                if (count % 2 == 0)
                {
                    n -= gcd(n, b);
                }
                else
                {
                    n -= gcd(n, a);
                }

                count++;
            }

            int answer = (--count % 2 == 0) ? 1 : 0;

            Console.WriteLine(answer);
        }

        public static int gcd(int a, int b)
        {
            if (b == 0)
            {
                return a;
            }

            return gcd(b, a % b);
        }
    }
}


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

namespace _262
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.SetIn(new StreamReader("input.txt"));

            solve_helvetic2019A1();
            //solve_262A();
        }

        public static void solve_helvetic2019A1()
        {
            long r = Convert.ToInt64(Console.ReadLine());

            bool found = false;
            long x = 0;
            long y = 0;
            long xLen = (int)Math.Sqrt(r);
            for (x = 1; x < xLen; x++)
            {
                long yLen = r <= 100000 ? r : r / (2 * y * xLen);
                for (y = 1; y < yLen; y++)
                {
                    long h = x * x + 2 * x * y + x + 1;
                    if (h > r)
                    {
                        break;
                    }

                    if (r == h)
                    {
                        found = true;
                        break;
                    }
                }

                if (found)
                {
                    break;
                }
            }

            if (found)
            {
                Console.Write("{0} {1}", x, y);
            }
            else
            {
                Console.Write("NO");
            }
        }

        public static void solve_262A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int bought = n;
            int max = n;
            while (bought > 0)
            {
                bought = max % m == 0 ? (bought + m - 1) / m : bought / m;
                max += bought;
            }
            Console.WriteLine(max);
        }

        /*
1)4
2)1 + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1)
4)1

1 1

2 3

3 7

4 14

5 25

1)5
2)1 + (1 + 1) + (1 + 1) + (1 + 1)
3)1 + (1 + 1 + 1) + (1 + 1 + 1)
4)1 + (1 + 1 + 1 + 1)
5)1

(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5
         */
        public static void solve_164B()
        {
            int n = Convert.ToInt32(Console.ReadLine());

            int total = 0;
            int prev = 0;
            int prevPrev = 0;
            for (int i = 1; i <= n; i++)
            {
                total = prevPrev + prev + i;

                prevPrev = prev;
                prev = total;
            }

            Console.WriteLine(total);
        }

        /*
        Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.
        То есть надо восстановить, сместив букву влево, то у нас будет исключение.
        Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.
        НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то
        мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.
        То есть такой кейс не рассматривается.

        Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать
        все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.
         */
        public static void solve_271A()
        {
            string direction = Console.ReadLine();
            string text = Console.ReadLine();

            string keyboard = "qwertyuiopasdfghjkl;zxcvbnm,./";

            string answer = String.Empty;
            if (direction == "R")
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) - 1];
                }
            }
            else
            {
                for (int i = 0; i < text.Length; i++)
                {
                    answer += keyboard[keyboard.IndexOf(text[i]) + 1];
                }
            }

            Console.WriteLine(answer);
        }

        /*
        Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ
        String.Contains.
        и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы
        log(n)
         */
        public static void solve_368A()
        {
            string[] nm = Console.ReadLine().Split(' ');

            int n = Convert.ToInt32(nm[0]);
            int m = Convert.ToInt32(nm[1]);

            int count = 0;
            string noir = "WBG";
            for (int i = 0; i < n; i++)
            {
                string[] row = Console.ReadLine().Split(' ');

                for (int j = 0; j < m; j++)
                {
                    if (noir.Contains(row[j]))
                    {
                        count++;
                    }
                }
            }

            string answer =  (count == n * m) ? "#Black&White" : "#Color";

            Console.WriteLine(answer);
        }

        public static void solve_90A()
        {
            string[] abn = Console.ReadLine().Split(' ');

            int a = Convert.ToInt32(abn[0]);
            int b = Convert.ToInt32(abn[1]);
            int n = Convert.ToInt32(abn[2]);

            int count = 1;
            while (n > 0)
            {
                if (count % 2 == 0)
                {
                    n -= gcd(n, b);
                }
                else
                {
                    n -= gcd(n, a);
                }

                count++;
            }

            int answer = (--count % 2 == 0) ? 1 : 0;

            Console.WriteLine(answer);
        }

        public static int gcd(int a, int b)
        {
            if (b == 0)
            {
                return a;
            }

            return gcd(b, a % b);
        }
    }
}


using System;

namespace HeidiLearnsHashingEasy
{
    class Program
    {
        static void Main(string[] args)
        {
            string input;
            long r;
            long x, y;

            while (true)
            {
                input = Console.ReadLine();

                if (string.IsNullOrEmpty(input)) break;

                r = long.Parse(input);

                if (r % 2 == 0)
                {
                    Console.WriteLine("NO");
                }
                else
                {
                    x = 1;
                    y = (r - 3) / 2;

                    if (y == 0)
                        Console.WriteLine("NO");
                    else
                        Console.WriteLine("{0} {1}", x, y);
                }
            }
        }
    }
}


using test;

namespace test
{
    class Program
    {
        static void
           Main(string[] args)
        {
            int w;

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

            if (w>1 && w<100)
            {
                if (w%2==0)
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }

            }
        }
    }
}


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)
        {
            long massa;
            massa = Convert.ToInt62(Console.ReadLine());
            if (massa % 2 == 0)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }
    }
}


using System;
{
    class Program
    {
        static void Main(string[] args)
        {
            byte watermelon = 1;
            Console.Write("What is the weight of the watermelon : ");
            watermelon = byte.Parse(Console.ReadLine());
            if (watermelon <= 100)
            {
                if (watermelon % 2 == 0)
                    Console.WriteLine("Yes");
                else
                    Console.WriteLine("No");
            }
            Console.ReadKey();
        }
    }
}


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

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

            int n = int.Parse(Console.ReadLine());
            if ((n   % 2 ==0) && (n/2)%2 == 0)) Console.WriteLine("YES");
            else Console.WriteLine("NO");

        }
    }
}


using System;

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

		if(input <= 2) || input % 2 != 0)
			Console.WriteLine("NO");
		else
			Console.WriteLine("YES");
	}
}


namespace AdhocProblems
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter a watermelon weight:");
            double w = Convert.ToDouble(Console.ReadLine()); //watermelon in kilograms
            if (w < 1 && w > 100)
            {
                Console.WriteLine("NO");
                Console.ReadLine();
            }

            if (w <= 2)
            {
                Console.WriteLine("NO");
                Console.ReadLine();
            }

            if (w <= 2)
            {
                Console.WriteLine("NO");
                Console.ReadLine();
            }
            if (w % 2 == 0)
            {
                Console.WriteLine("YES");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("NO");
                Console.ReadLine();
            }
        }
    }
}


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

class Solution{

	static void Main(string [] args){
		in n = int.Parse(Console.ReadLine());

		if(n > 3 && n % 2 == 0)
			Console.WriteLine("YES");
		else
			Console.WriteLine("NO");
	}
}


using System;
using System.Linq;

namespace A_Hongcow_Learns_the_Cyclic_Shift
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            String answer = new String(str.Distinct().ToArray());
            Console.WriteLine(answer.Length);
        }
    }
}


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

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

            string s2 = s.Last() + s.Remove(s.Length - 1, 1);
            int res = 0;

            while (s2 != s)
            {
                s2 = s2.Last() + s2.Remove(s.Length - 1, 1);
                res++;
            }
            Console.WriteLine(res);
        }
    }
}


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

namespace ReadWriteTemplate
{
    public static class Solver
    {
        private static void SolveCase()
        {
            const long MOD = 998244353;

            int n = ReadInt();
            int k = ReadInt();
            long l = ReadInt();

            int N = 2 * n + 2;
            long[,,] a = new long[N, N, 2];
            long[,,] b = new long[N, N, 2];
            a[0, 0, 0] = 1;
            b[0, 0, 0] = 1;

            for (int i = 0; i < 2 * n + 1; i++)
            {
                for (int j = 0; j <= i; j++)
                {
                    for (int e = 0; e < 2; e++)
                    {
                        if (e == 0)
                        {
                            if (j >= k)
                            {
                                a[i + 1, j, 1] += a[i, j, e];
                                Fix(ref a[i + 1, j, 1], MOD);
                            }
                            b[i + 1, j, 1] += b[i, j, e];
                            Fix(ref b[i + 1, j, 1], MOD);
                        }
                        if (j > 0)
                        {
                            a[i + 1, j - 1, e] = (a[i + 1, j - 1, e] + j * a[i, j, e]) % MOD;
                            b[i + 1, j - 1, e] = (b[i + 1, j - 1, e] + j * b[i, j, e]) % MOD;
                        }
                        if (i + j - e <= 2 * n - 2)
                        {
                            a[i + 1, j + 1, e] += a[i, j, e];
                            Fix(ref a[i + 1, j + 1, e], MOD);
                            b[i + 1, j + 1, e] += b[i, j, e];
                            Fix(ref b[i + 1, j + 1, e], MOD);
                        }
                    }
                }
            }

            long ans = a[2 * n + 1, 0, 1] * Inv(b[2 * n + 1, 0, 1], MOD) % MOD;
            ans = ans * l % MOD;

            Writer.WriteLine(ans);
        }

        public static void Fix(ref long x, long mod)
        {
            if (x >= mod)
            {
                x -= mod;
            }
        }

        public static long Inv(long a, long mod)
        {
            return BinPower(a, mod - 2, mod);
        }

        public static long BinPower(long a, long n, long mod)
        {
            long result = 1;

            while (n > 0)
            {
                if ((n & 1) != 0)
                {
                    result = (result * a) % mod;
                }

                a = (a * a) % mod;
                n >>= 1;
            }

            return result;
        }

        public static void Solve()
        {
#if DEBUG
            var sw = Stopwatch.StartNew();
#endif

            SolveCase();

            /*int T = ReadInt();
            for (int i = 0; i < T; i++)
            {
                Writer.Write("Case #{0}: ", i + 1);
                SolveCase();
            }*/

#if DEBUG
            sw.Stop();
            Console.WriteLine($"{sw.ElapsedMilliseconds} ms");
#endif
        }

        public static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

#if DEBUG
            // Reader = Console.In; Writer = Console.Out;
            Reader = File.OpenText("input.txt"); Writer = File.CreateText("output.txt");
#else
            Reader = Console.In; Writer = Console.Out;
#endif

            // Solve();
            Thread thread = new Thread(Solve, 64 * 1024 * 1024);
            thread.CurrentCulture = CultureInfo.InvariantCulture;
            thread.Start();
            thread.Join();

            Reader.Close();
            Writer.Close();
        }

        public static IOrderedEnumerable<TSource> OrderByWithShuffle<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
        {
            return source.Shuffle().OrderBy(keySelector);
        }

        public static T[] Shuffle<T>(this IEnumerable<T> source)
        {
            T[] result = source.ToArray();
            Shuffle(result);
            return result;
        }

        private static void Shuffle<T>(IList<T> array)
        {
            Random rnd = new Random();
            for (int i = array.Count - 1; i >= 1; i--)
            {
                int k = rnd.Next(i + 1);
                T tmp = array[k];
                array[k] = array[i];
                array[i] = tmp;
            }
        }

        #region Read/Write

        private static TextReader Reader;

        private static TextWriter Writer;

        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 string ReadLine()
        {
            return Reader.ReadLine();
        }

        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 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hongcow
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = Console.ReadLine();

            var count = word.Distinct().Count();

            Console.WriteLine(count);

        }
    }
}


using System;
using System.Linq;

class ProblemSolving {

    public static void Main() {
        var str = Console.ReadLine();
            HashSet<string> S = new HashSet<string>();
            S.Add(str);
            int n = str.Length;
            for (int i = 0; i < n; i++) {
                str = str.Substring(1) + str[0];
                S.Add(str);
            }
            Console.WriteLine(S.Count);
    }
}


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

namespace _100853_Codeforce
{
    class Program
    {

        static void Main(string[] args)
        {

               /*int[] arr2 = s1.Split(' ').
             Where(x => !string.IsNullOrWhiteSpace(x)).
             Select(x => int.Parse(x)).ToArray();*/

            string s = Console.ReadLine();

            int count = s.Select(char.ToLower).Distinct().Count(char.IsLetter);

            Console.WriteLine(count);

           // Console.ReadKey();

        }

    }
}


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

namespace _100853_Codeforce
{
    class Program
    {

        static void Main(string[] args)
        {

               /*int[] arr2 = s1.Split(' ').
             Where(x => !string.IsNullOrWhiteSpace(x)).
             Select(x => int.Parse(x)).ToArray();*/

            string s = Console.ReadLine();

            s += s;
            string[] letters = new string[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                letters[i] = s.Substring(i, s.Length);
            }
            Console.WriteLine(letters.Distinct().Count());

        }

    }
}


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

namespace codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            var result = solve(input);
            Console.WriteLine(result);
            Console.ReadLine();
        }
        static int solve(string input)
        {
            var inputArr = input.ToCharArray();
            return inputArr.Distinct().Count();
        }
    }
}


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

namespace ConsoleApplication1
{

    class Program
    {

        public int HongcowLearnsTheCyclicShift(string word)
        {
            int count = 0;
            int len = word.Length;
            string temp1 = "", temp2 = word;
            do
            {
                temp1 += temp2[len - 1];
                for (int i = 0; i < len - 1; ++i)
                {
                    temp1 += temp2[i];
                }
                temp2 = temp1;
                temp1 = "";
                count++;
            }
            while(temp2 != word);

            return count;
        }

        static void Main(string[] args)
        {
            Program p = new Program();
            Console.WriteLine(p.HongcowLearnsTheCyclicShift("yzyz"));
            /*int t = 0;
            t = int.Parse(Console.ReadLine());
            for (int i = 0; i < t; ++i)
            {
                string word = Console.ReadLine();
                Console.WriteLine(p.WayTooLongWords(word));
            }*/
            //Console.WriteLine(p.GetSpaces("am you mo el ",0));
        }

    }
}


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

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var res = GetPrices(s[0], s[1]).Last();
    Console.Write(res);
  }

  static IEnumerable<long> GetPrices(long p, long d) {
    yield return p;
    var min = p - d;
      var mult = 10;
      while (true) {
        p -= (1 + p%mult) % mult;
        if (p < min) yield break;
        yield return p;
        mult *= 10;
      }
    }
  }
}


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

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var res = GetPrices(s[0], s[1]).Last();
    Console.Write(res);
  }

  static IEnumerable<long> GetPrices(long p, long d) {
    yield return p;
    var min = p - d;
    var mult = 10;
    while (true) {
      p -= (1 + p%mult) % mult;
      if (p < min) yield break;
      yield return p;
      mult *= 10;
    }
  }
}


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

namespace B.Special_Offer__Super_Price_999_Bourles_
{
    class Program
    {
        static void Main(string[] args)
        {
            string inp = Console.ReadLine();

            long  x = -1;
            int nines = 0;
           // Console.WriteLine(long.MaxValue);
            long p = long.Parse(inp.Split()[0]);
            long d = long.Parse(inp.Split()[1]);
            for (long i = p; i >= p-d ; i--)
            {///1000000000000000000

                string tem = i.ToString();
                long ss = NumOfNines(tem);
                if (ss>x)
                {
                    x = ss;
                    inp = i.ToString();
                }
                if (tem.Length-x <5)
                {
                    break;
                }
            }
            Console.WriteLine(inp);

        }
        static long NumOfNines(string s)
        {
            long x = 0;
            for (int i = s.Length-1 ; i >= 0 ; i--)
            {
                if (s[i]!='9')
                {
                    break;
                }

                x++;

            }

            return x;
        }
    }
}


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

namespace B.Special_Offer__Super_Price_999_Bourles_
{
    class Program
    {
        static void Main(string[] args)
        {
            string inp = Console.ReadLine();
            long  x = -1;
            int nines = 0;
            int p = int.Parse(inp.Split()[0]);
            int d = int.Parse(inp.Split()[1]);
            for (int i = p; i >= p-d ; i--)
            {

                string tem = i.ToString();
                long ss = NumOfNines(tem);
                if (ss>x)
                {
                    x = ss;
                    inp = i.ToString();
                }
            }
            Console.WriteLine(inp);

        }
        static long NumOfNines(string s)
        {
            long x = 0;
            for (int i = s.Length-1 ; i >= 0 ; i--)
            {
                if (s[i]!='9')
                {
                    break;
                }
                x++;
            }

            return x;
        }
    }
}


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

namespace B.Special_Offer__Super_Price_999_Bourles_
{
    class Program
    {
        static void Main(string[] args)
        {
            string inp = Console.ReadLine();

            long  x = -1;
            int nines = 0;
           // Console.WriteLine(long.MaxValue);
            long p = long.Parse(inp.Split()[0]);
            long gp=p;
            long d = long.Parse(inp.Split()[1]);
            int digits=d.ToString().Length;
            while (digits>0)
            {
                long rem=p%10;
                int xxx = nines;
                long xxxx = p;
                while (p % 10  != 9)
                {
                    p--;
                }
                p=p/10;
                nines ++ ;
                long ptem=p;
                for (int i = 0; i < nines; i++)
                {
                    ptem*=10;
                    ptem+=9;
                }
                if (ptem < gp - d)
                {
                    nines = xxx;
                    p = xxxx;
                    break;
                }

             digits--;

            }
            for (int i = 0; i < nines; i++)
                {
                    p*=10;
                    p+=9;
                }
            Console.WriteLine(p);

        }

       }

    }


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

namespace Z219B {
    class Program {
        static void Main(string[] args) {
            long start, diver;
            string[] buf = Console.ReadLine().Split();
            start = long.Parse(buf[0]);
            diver = long.Parse(buf[1]);

            long good = start;

            for (int i = 10; start - ((start % i) - 1) >= start - diver; i *= 10) {
                good = start - (start % i) - 1;
            }

            Console.WriteLine(good);
          //  Console.ReadKey();

        }
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp10", "ConsoleApp10\ConsoleApp10.csproj", "{892D3637-102B-45A3-BCEA-60A9F01CE1C1}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {E31B0511-87CC-4B41-8654-8DF6F2D9E161}
	EndGlobalSection
EndGlobal


/*
There are n integers a1, a2, ..., an. Each of those integers can be either 0 or 1. We are allowed to do exactly one move: We must choose two indices i and j (1 <= i <= j <= n) and flip all values ak for which their positions are in range [i, j] (that is i <= k <= j). Flip the value of x means to apply operation x = 1 - x.

The goal is - After exactly one move to obtain the maximum number of ones.

Input:-

The first line of the input contains an integer n (1 <= n <= 10^6). In the second line of the input there are n integers: a1, a2, ..., an. It is guaranteed that each of those n values is either 0 or 1

Output:-
Print an integer - the maximal number of 1s that can be obtained after exactly one move.

Sample test(s)
input
5
1 0 0 1 0
output
4

input
4
1 0 0 1
output
4

Note:-
In the first case, flip the segment from 2 to 5 (i=2, j=5). That flip changes the sequence, it becomes: [1 1 1 0 1]. So, it contains four ones. There is no way to make the whole sequence equal to [1 1 1 1 1].

In the second case, flipping only the second and the third element (i=2, j=3) will turn all numbers into 1.

Source: http://codeforces.ru/problemset/problem/327/A
*/

using System;

namespace FlippingGame327A
{
    class Program
    {
        int kkMax(int a, int b)
        {
            return (a < b) ? b : a;
        }

        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int n = Convert.ToInt32(str);
            str = Console.ReadLine();
            string[] strArray = str.Split(' ');
            int[] input = new int[n + 3];
            int sum = 0;
            for (int i = 0; i < n; i++)
            {
                input[i] = Convert.ToInt32(strArray[i]);
                if (input[i] == 1)
                {
                    sum++;
                }
            }

            // main logic
            // O(n) solution... it is a version of 'maximum subarray problem' which can be solved using Kadane's Algorithm
            int ans = (input[0] == 1) ? -1 : 1;
            int ends = ans;
            for (int i = 1; i < n; i++)
            {
                int temp = 1;
                if (input[i] == 1)
                {
                    temp = -1;
                }

                ends = kkMax(temp, ends + temp);
                ans = kkMax(ans, ends);
            }
            Console.WriteLine(sum + ans);
            /*
            // O(n^2) solution
            int[,] res = new int[n, n];
            int ans = Int32.MinValue;
            for (int i = 0; i < n; i++)
            {
                int zeros = 0;
                for (int j = i; j < n; j++)
                {
                    if (input[j] == 0)
                    {
                        zeros++;
                        res[i, j] = zeros;
                    }
                    int temp = sum - (j - i + 1 - res[i, j]) + res[i, j];
                    ans = (temp > ans) ? temp : ans;
                }
            }
            Console.WriteLine(ans);
            Console.ReadLine();
            */
        }
    }
}


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

namespace CodeForces.Solutions.c318_188_2
{
	public class Program1
    {
        public static long[] ReadLongs(int n)
        {
            var s = Console.ReadLine() + " ";
            var result = new long[n];
            var i = 0;
            var acc = 0L;
            var i2 = 0;
            while (i < n)
            {
                if (s[i2] == ' ')
                {
                    result[i++] = acc;
                    i2++;
                    acc = 0;
                }
                else
                    acc = acc * 10 + (s[i2++] - '0');
            }
            return result;
        }

        public static void ReadLongs(out long l1, out long l2)
        {
            var ls = ReadLongs(2);
            l1 = ls[0];
            l2 = ls[1];
        }

        public static void ReadLongs(out long l1, out long l2, out long l3)
        {
            var ls = ReadLongs(3);
            l1 = ls[0];
            l2 = ls[1];
            l3 = ls[2];
        }

        public static void ReadLongs(out long l1, out long l2, out long l3, out long l4)
        {
            var ls = ReadLongs(4);
            l1 = ls[0];
            l2 = ls[1];
            l3 = ls[2];
            l4 = ls[3];
        }

        public static void Main()
        {
	        checked
	        {

	            long n, k;
	            ReadLongs(out n, out k);
	            var f = (n + 1)/2;
                if (k <= f)
                {
                    Console.Write(k*2 - 1);
                }
                else
                {
                    k -= f;
                    Console.Write(k*2);
                }

	        }
        }
    }
}


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

namespace Practise_7
{
    class Program
    {
        static void Main(string[] args)
        {
            string Input = Console.ReadLine();
            //string Input = "pnnepelqomhhheollvlo";
            IEnumerable<char> AllowedChar = new[] { 'h', 'e', 'l', 'o', ' ' };
            string NewString = new String(Input.Select(x => !AllowedChar.Contains(x) ? ' ' : x).ToArray());
            int index = 0;
            for (var i = 0; i < NewString.Length; i++)
            {
                if (NewString[i] == "hello"[index])
                {
                    index += 1;
                }
            }
            Console.WriteLine(index == 5 ? "YES" : "NO");
        }
    }
}


 public class Program
    {
        private static void Main(string[] args)
        {
            var input = Console.ReadLine();

            var list = new List<Char>
            {
                'h',
                'e',
                'l',
                'l',
                'o'
            };

            for (int i = 0; i < input.Length; i++)
            {
                if (list.Count >= 1 && input[i] == list[0])
                {
                    list.RemoveAt(0);
                }
            }

            Console.WriteLine(list.Count == 0 ? "YES" : "NO");
        }
    }


using System;
using System.Linq;

public class Program
{
    private static void Main()
    {
        while (true)
        {
            var str = Console.ReadLine();
            if ("hello".All(c => str.Contains(c))
                && str.IndexOf("h") < str.IndexOf("e")
                && str.IndexOf("e") < str.IndexOf("l")
                && str.IndexOf("l") < str.LastIndexOf("l")
                && str.LastIndexOf("l") < str.IndexOf("o")) Console.WriteLine("YES");
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


using System;
using System.Linq;

public class Program
{
    private static void Main()
    {//hlelo
        var str = new string(Console.ReadLine().Where(c => "helo".Contains(c)).ToArray());
        str = str.Remove(0, str.IndexOf('h'));
        if (str.IndexOf("h") < str.IndexOf("e") && str.All(c => "helo".Contains(c)) && str.Count(c => c == 'l') > 1)
        {
            str = str.Remove(0, str.IndexOf('e'));
            if (str.IndexOf("e") < str.IndexOf("l"))
            {
                str = str.Remove(0, str.IndexOf('l')+);
                if (str.IndexOf("l") < str.IndexOf("o"))
                {
                    Console.WriteLine("YES");
                    return;
                }
            }
        }

        Console.WriteLine("NO");
    }
}


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

namespace _58A
{
    class Program
    {
        static void Main(string[] args)
        {
            List<char> checkList = new List<char> { };
            char[] cArr = new char[5];
            string hello = "hello";

            string input = Console.ReadLine();

            int j = 0;

            for (int i = 0; i < input.Length; i++)
            {
                if (input[i] == hello[j])
                {
                    cArr[j] = input[i];
                    j++;
                }

            }

            if (new string(cArr) == hello)
            {
                Console.Write("YES");
            }

            else
            {
                Console.Write("NO");
            }
        }
    }
}


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

namespace W0lf
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int z = 0;
            for(int i = 0; i < s.Length; i++)
            {
                if(z == 0 && s[i] == 'h') z++;
                if(z == 1)
                {
                    if(s[i] == 'e') z++;
                    else if(s[i] != 'h') z = 0;
                }
                if(z == 2)
                {
                    if(s[i] == 'l') z++;
                    else if(s[i] != 'e') z = 0;
                }
                if(z == 3)
                {
                    if(s[i] == 'l') z++;
                    else z = 0;
                }
                if(z == 4)
                {
                    if(s[i] == 'o')
                    {
                        Console.WriteLine("YES");
                        return;
                    }
                    else if(s[i] != 'l') z = 0;
                }
            }
            Console.WriteLine("NO");
            Console.ReadLine();
        }
    }


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

namespace Codeforces__20_Aug
{
    class Program
    {

    static void Main(string[] args)
        {
            String s = Console.ReadLine();

            Dictionary<char, int> dict = new Dictionary<char, int>();

            for (int i = 0; i < s.Length; i++)
            {
                if (!dict.ContainsKey(s[i]))
                {
                    dict.Add(s[i], 1);

                }
                else
                {
                     dict[s[i]] = dict[s[i]] + 1;
                }

            }
            //foreach (var item in dict)
            //{
            //    Console.WriteLine(item);
            //}
            int flag = 0;
            if (dict.ContainsKey('h') &&
                dict.ContainsKey('e') &&
                dict.ContainsKey('l') &&
                dict.ContainsKey('o') && dict['l'] >1 && s.Length > 5)
            {
                flag = 1;
            }
            else
            {
                flag = 0;
            }
            if (flag == 1)
            {
                string st = "hello";
                int j = 0;
                for (int i = 0; i < s.Length; i++)
                {
                    if (!s[i].Equals(st[j]))
                    {
                        flag = 0;

                    }
                    else
                    {
                        j += 1;
                    }
                }
            }

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


using System;
using System.Linq;

namespace codeforces58A
{
    class Program
    {
        static void Main(string[] args)
        {
            string input_string = Console.ReadLine();
            string hello = "hello";
            int hello_index = 0;

            for (int i = 0; i < input_string.Length; i++)
            {
                if (input_string[i] == hello[hello_index])
                    hello_index += 1;

            }

            if (hello_index == 5){
                Console.WriteLine("YES");
            }
            else{
                Console.WriteLine("NO");
            }
        }

    }
    }
}


using System;
using System.Linq;

namespace codeforces58A
{
    class Program
    {
        static void Main(string[] args)
        {
            string input_string = Console.ReadLine();
            string hello = "hello";
            int hello_index = 0;

            for (int i = 0; i < input_string.Length; i++)
            {
                if (input_string[i] == hello[hello_index])
                    hello_index += 1;

            }

            if (hello_index == 5){
                Console.WriteLine("YES");
            }
            else{
                Console.WriteLine("NO");
            }
        }

    }

}


using System;

 class Exercise11

{

     static void Main()

     {

      int n=Convert.ToInt32(Console.ReadLine());
      int num=new int[n];

        for (int i = 0; i < n; i++) {
            num[i]=Convert.ToInt32(Console.ReadLine());
        }
        if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && n % 2 == 1) {
            Console.WriteLine("YES");
        }
        else {
            Console.WriteLine("NO");
        }
    }

}


using System;

 class Exercise11

{

     static void Main()

     {

      int n=Convert.ToInt32(Console.ReadLine());
      int[] num=new int[n];

        for (int i = 0; i < n; i++) {
            num[i]=Convert.ToInt32(Console.Read());
        }
        if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && n % 2 == 1) {
            Console.WriteLine("YES");
        }
        else {
            Console.WriteLine("NO");
        }
    }

}


using System;

 class Exercise11

{

     static void Main()

     {

      int n=Convert.ToInt32(Console.ReadLine());
      int[] num=new int[n];

        for (int i = 0; i < n; ++i) {
            num[i]=Convert.ToInt32(Console.ReadLine());
        }
        if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && (n % 2) == 1) {
            Console.WriteLine("YES");
        }
        else {
            Console.WriteLine("NO");
        }
    }

     }


using System;
using System.Linq;

namespace CSharp
{
    public class _849A
    {
        public static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split().Select(token => int.Parse(token)).ToArray();

            Console.WriteLine((a.First() * a.Last()) % 2 == 1 ? "Yes" : "No");
        }
    }
}


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

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

            stringInput = Console.ReadLine();
            string[] inputs = stringInput.Split(' ');
            int[] array = new int[arrayLength];
            for (int i = 0; i < arrayLength; i++)
            {
                array[i] = int.Parse(inputs[i]);
            }

            int numberOfOddSplits = 0;
            if (array[0] % 2 == 0 || array[arrayLength-1] % 2 == 0)
            {
                Console.WriteLine("No");
            }
            else
            {
                for (int i = 1; i < arrayLength; i++)
                {
                    if (array[i] % 2 != 0 && array[i - 1] % 2 != 0)
                    {
                        numberOfOddSplits++;
                    }
                }
                if(numberOfOddSplits % 2 == 0)
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }
        }

    }
}


using System;
    class Program
    {
        static void Main(string[] args)
        {
            int[] vls, dls;
            {
                string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
                vls = new int[3] {int.Parse(input[0]), int.Parse(input[1]), int.Parse(input[2])};
            }
            dls = new int [3] { 1, 2, 3 };
            Array.Sort(vls, dls);
            int a = vls[0] + vls[1];
            if (a < vls[2] || (a + vls[2]) % 2 == 1) Console.WriteLine("Impossible");
            else
            {
                a -= vls[2];
                a /= 2;
                vls[0] -= a;
                vls[1] -= a;
                if (dls[2] == 3)
                    Console.WriteLine(dls[0] == 1 ? String.Format("{0} {1} {2}", a, vls[1], vls[0]) : String.Format("{0} {1} {2}", a, vls[0], vls[1]));
                else if (dls[2] == 2)
                    Console.WriteLine(dls[0] == 1 ? String.Format("{0} {1} {2}", vls[0], vls[1], a) : String.Format("{0} {1} {2}", vls[1], vls[0], a));
                else
                    Console.WriteLine(dls[0] == 2 ? String.Format("{0} {1} {2}", vls[0], a, vls[1]) : String.Format("{0} {1} {2}", vls[1], a, vls[0]));
            }
        }


using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;

namespace CodeforcesTasks
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var valences = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var possibles = new List<int[]>();
            CalculateConnections(new[] {0, 0, 0}, valences, possibles);
            var permutationFound = false;
            foreach (var permutation in possibles)
            {
                var isOk = true;
                for (int i = 0; i < valences.Length; i++)
                {
                    if (permutation[i] + permutation[i - 1 < 0 ? permutation.Length - 1 : i - 1] != valences[i])
                    {
                        isOk = false;
                        break;
                    }
                }

                if (isOk)
                {
                    Console.WriteLine(string.Join(" ", permutation));
                    permutationFound = true;
                    break;
                }
            }

            if (!permutationFound)
            {
                Console.WriteLine("Impossible");
            }
        }

        public static void CalculateConnections(int[] connections, IEnumerable<int> valences, List<int[]> possibles)
        {
            if (!valences.Any())
            {
                possibles.Add(connections);
                return;
            }
            var nextValence = valences.First();

            var currentAtom = 3 - valences.Count();
            for (int i = 0; i <= nextValence; i++)
            {
                var copyConnections = new int[3];
                connections.CopyTo(copyConnections, 0);
                copyConnections[currentAtom] = i;
                CalculateConnections(copyConnections, valences.Skip(1), possibles);
            }
        }
    }
}


using System;
class test
{
    static void Main()
    {
        bool check = false;
        string[] d = Console.ReadLine().Split();
        int d0 = int.Parse(d[0]);
        int d1 = int.Parse(d[1]);
        int d2 = int.Parse(d[2]);
        if ((d0 + d1 - d2) % 2 != 0) check = true;
        int a = (d0+d1-d2)/2;
        int b = d1 - a;
        int c = d2 - b;
        if (check) Console.Write("Impossible");
        else if ((a == 0 || a == 1 || a == 2 || a == 3) && (b == 0 || b == 1 || b == 2 || b == 3) && (c ==0 || c == 1 || c == 2 || c == 3)) Console.Write("{0} {1} {2}\n", a, b, c);
        else { Console.Write("Impossible"); }
        //Console.ReadLine();
    }

}


using System;
using static System.Linq.Enumerable;
class Solution {

  static void Main(string [] args) {
    var A = Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), int.Parse);
    if (A.Sum() % 2 > 0) {
      Console.WriteLine("Impossible");
    }
    else {
      int[] ans = {0, 0, 0};
      while (A.Sum() > 0) {
        int argMin = A.ToList().IndexOf(A.Min());
        int i = (argMin + 1) % 3, j = (i + 1) % 3;
        --A[i]; --A[j];
        ++ans[i];
      }
      for (int i = 0; i < 3; ++i) {
        Console.Write(ans[i].ToString() + " \n"[i == 2 ? 1 : 0]);
      }
    }
  }
};


Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contest", "Contest\Contest.csproj", "{D52529B4-C89C-4B07-A089-373AD7796792}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{D52529B4-C89C-4B07-A089-373AD7796792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{D52529B4-C89C-4B07-A089-373AD7796792}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{D52529B4-C89C-4B07-A089-373AD7796792}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{D52529B4-C89C-4B07-A089-373AD7796792}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


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

namespace ConsoleApp5
{
    public class Program
    {
        static void Main()
        {
            var s = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var res = Min(s[1] * s[2] / s[0], s[3] * s[4], s[5] / s[7]) / s[0];
            Console.WriteLine(res);
        }
        static int Min(int a, int b, int c)
        {
            return Math.Min(Math.Min(a, b), c);
        }
    }
}


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

namespace A.Газировкопитие
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int n = Convert.ToInt32(s[0]);
            int k = Convert.ToInt32(s[1]);
            int l = Convert.ToInt32(s[2]);
            int c = Convert.ToInt32(s[3]);
            int d = Convert.ToInt32(s[4]);
            int p = Convert.ToInt32(s[5]);
            int nl = Convert.ToInt32(s[6]);
            int np = Convert.ToInt32(s[7]);
            int gaz = (k * l) / nl;
            int lime = c * d;
            int salt = p / np;
            Tosti(gaz,lime,salt,n);
        }

        static void Tosti(int gaz, int lime, int salt, int chelov)
        {
            int min1=100;
            int[] min = new int[3];
            min[0] = gaz;
            min[1] = lime;
            min[2] = salt;
            for (int i = 0; i < 3; i++)
                if (min[i] < min1)
                    min1 = min[i];
            Console.WriteLine(min1/chelov);
        }

    }
}