using System;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Text;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int red = Convert.ToInt32(input[0]);
            int blue = Convert.ToInt32(input[1]);

            StringBuilder sb = new StringBuilder();

            int diff = Math.Min(red,blue);
            sb.Append(diff + " ");

            diff = Math.Abs(red - blue);
            diff = diff / 2;

            sb.Append(diff);
            Console.WriteLine(sb.ToString());
        }
    }
}


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

namespace Watermelon
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Sayi Giriniz");
            int sayi =Convert.ToInt32(Console.ReadLine());

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

        }
    }
}


using System;

namespace CodeKata
{
    class Program
    {
        static void Main(int n)
        {
            Console.WriteLine(CodeForceWaterMelon(n));

        }
        private static string CodeForceWaterMelon(int w)
        {
            string result;
            try {
                if (w < 1 || w > 100)
                {
                    throw new Exception("More than 100 or Less Than 1");

                }
                else
                {
                    if (w % 2 == 1)
                    { //odd Number
                        result = "NO";
                    }
                    else
                    {
                        result = "YES";
                    }
                }

            }
            catch (Exception e)
            {
                return e.Message;
            }
            return result;
        }
    }
}


namespace CodeKata
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int inp = int.Parse(input);
               if (inp % 2 == 1 || inp == 2 && (inp < 1 || inp > 100))
                { //odd Number
                    Console.WriteLine("NO");
                }
                else
                { //even
                    Console.WriteLine("YES");
                }

        }

    }
}


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

    class Program{
        int Main(){

          int w = Console.Read();
          if (w%2 == 0 && w > 0){
            Console.WriteLine("YES");
          }
          else{
              Console.WriteLine("NO");
          }
        return 0;
    }
    }


class Program
    {
        static void Main(string[] args)
        {
            int w = int.Parse(Console.ReadLine());
            if (w == 2 || w % 2 != 0)
            {
                Console.WriteLine("NO");
            }
            else
            {
                Console.WriteLine("YES");
            }
            Console.ReadKey();

        }
    }


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

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

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


using System;

namespace Codeforces
{
    class Codeforces
    {
        public static string Main(string[] args)
        {
            return DivideWatermelon(int.Parse(args[0]));
        }

        public static string DivideWatermelon(int w)
        {
            return w % 2 == 0 ? "YES" : "NO";
        }
    }
}


using System;

namespace Codeforces
{
    class Codeforces
    {
        public static void Main(string[] args)
        {
            DivideWatermelon(int.Parse(args[0]));
        }

        public static string DivideWatermelon(int w)
        {
            return w % 2 == 0 ? "YES" : "NO";
        }
    }
}


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

namespace ProgrammingContest.Codeforces.Round85 {
    class C {
        static int[] ReadInts() { return Array.ConvertAll(Console.ReadLine().Split(' '), sss => int.Parse(sss)); }

        static int popcount(int n) { int res = 0; for (; n > 0; n &= n - 1)res++; return res; }

        static int n, m;
        static bool check(int v, int j) {
            int mask = (1 << m) - 1;
            return ((v | (v << 1) | (v >> 1) | j) & mask) == mask;
        }

        static void Main() {
            var xs = ReadInts();
            n = xs.Max();
            m = xs.Min();

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

            var dp = new int[][,] { new int[1 << m, 1 << m], new int[1 << m, 1 << m] };

            for (int v = 0; v < 1 << m; v++)
                for (int j = 0; j < 1 << m; j++)
                    dp[0][v, j] = 1 << 29;

            dp[0][(1 << m) - 1, 0] = 0;

            int a = 0;
            for (int i = 0; i <= n; i++, a ^= 1) {
                var cur = dp[a];
                var next = dp[a ^ 1];

                for (int v = 0; v < 1 << m; v++)
                    for (int j = 0; j < 1 << m; j++)
                        next[v, j] = 1 << 29;

                for (int v = 0; v < 1 << m; v++) {
                    for (int j = 0; j < 1 << m; j++) {
                        for (int k = 0; k < 1 << m; k++) {
                            if (check(v, j | k)) {
                                next[v, k] = Math.Min(cur[j, v] + popcount(k), next[v, k]);
                            }
                        }
                    }
                }
            }

            int res = 1000000000;
            for (int v = 0; v < 1 << m; v++)
                for (int j = 0; j < 1 << m; j++)
                    res = Math.Min(res, dp[a][v, j]);
            Console.WriteLine(n * m - res);
        }
    }
}


using System;

namespace ProblemB
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            uint n = uint.Parse(Console.ReadLine());
            string binary = Convert.ToString(n, 2);
            int size = binary.Length - binary.IndexOf("1");

            decimal result = 1;
            for (int i = 1; i <= 2; i++)
            {
                result *= size - (i - 1);
                result /= i;
            }

            Console.WriteLine((int)result / 3);
        }
    }
}


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

namespace Xorygol
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 0;
            int n = Convert.ToInt32(Console.ReadLine());
            for (int a = 1; a <= n; a++)
            {
                for (int b = a; b <= n; b++)
                {
                    for (int c = b; (c < a + b) && c <= n; c++)
                    {
                        if(((a ^ b ^ c) == 0) && (a + b > c) && (a + c > b) && (c + b > a))
                        {
                            count++;
                        }
                    }
                }
            }
            Console.WriteLine(count);
        }
    }
}


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

namespace Xorygol
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 0;
            int n = Convert.ToInt32(Console.ReadLine());
            for (int a = 1; a <= n; a++)
            {
                for (int b = a; b <= n; b++)
                {
                    for (int c = b; c < a + b; c++)
                    {
                        if(((a ^ b ^ c) == 0) && (a + b > c) && (a + c > b) && (c + b > a))
                        {
                            count++;
                        }
                    }
                }
            }
            Console.WriteLine(count);
        }
    }
}


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

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            int W;
            W = Convert.ToInt64(Console.ReadLine();
            if (W%2 == 0) { W = W / 2; };
            if (W % 2 == 0) { Console.WriteLine('YES'); }
            else { Console.WriteLine('NO'); };

        }
    }
}


public class Program{
    public static void Main(){
        string line = Console.ReadLine();
        int w = Int32.Parse(line);
        string ans=string.Empty;
        if(w%2==0)ans="YES";
        else ans="NO";
        Console.WriteLine(ans);
    }
}


using System;
    class Program
    {

        static void Main(string[] args)
        {

            int w = int.Parse(Console.ReadLine());
            int a = w / 2;
            if (a % 2 == 0)
            Console.WriteLine("Yes");
            else
            Console.WriteLine("NO");

        }
    }
}


using System;

public class Solution
{
    public static void Main(string[] args)
    {
        new Solution().Run();
    }

    public void Run()
    {
        try
        {
            Init();
            Solve();
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }

        Console.ReadLine();
    }

    private void Init()
    {
        inputBuffer = new string[0];
        inputBufferIndex = 0;
    }

    private string[] inputBuffer;
    private int inputBufferIndex;

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

    private string ReadString()
    {
        while (inputBufferIndex == inputBuffer.Length)
        {
            inputBuffer = ReadLine().Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
            inputBufferIndex = 0;
        }

        return inputBuffer[inputBufferIndex++];
    }

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

    private long ReadLong() { return Int64.Parse(ReadString()); }

    private double ReadDouble() { return Double.Parse(ReadString()); }

    private void Solve()
    {
        int weight = ReadInt();

        bool can = (weight > 2 && weight % 2 == 0);
        Console.WriteLine(can ? "YES : "NO");
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Watermelon", "Watermelon\Watermelon.csproj", "{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.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;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int W = int.Parse(Console.ReadLine());
            if ((W%2) == 0, W != 2)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static int[] ReadInt(int size)
        {
            string[] input = Console.ReadLine().Split(' ');
            int[] res = new int[size];
            for (int i=0; i<input.Length; i++)
            {
                res[i] = Convert.ToInt32(input[i]);
            }
            return res;
        }

        static int ReadInt()
        {
            int n = Convert.ToInt32(Console.ReadLine());
            return n;
        }

        static void ReadInt(out int a, out int b)
        {
            int[] input = ReadInt(2);
            a = input[0];
            b = input[1];
        }

        static void ReadInt(out int a, out int b, out int c)
        {
            int[] input = ReadInt(3);
            a = input[0];
            b = input[1];
            c = input[2];
        }

        static void ReadInt(out int a, out int b, out int c, out int d)
        {
            int[] input = ReadInt(3);
            a = input[0];
            b = input[1];
            c = input[2];
            d = input[3];
        }

        static String ReadString()
        {
            return Console.ReadLine();
        }

        static int Max(int a, int b)
        {
            return (a > b ? a : b);
        }

        static void WL<T> (T s)
        {
            Console.WriteLine(s);
        }

        static void swap(ref int a, ref int b)
        {
            int temp = a;
            a = b;
            b = temp;
        }

        static void Main(string[] args)
        {
            int n, m, a, b;
            ReadInt(out n, out m, out a, out b);
            int res = 0;
            if (a*m > b)
            {
                res = (n / m) * b + (n % m) * a;
            }
            else
            {
                res = n * a;
            }
            WL(res);
        }
    }
}


using System;

public class CheapTravel {

	public static void Main(string[] args){

		var n = int.Parse(args[0]);
		var m = int.Parse(args[1]);
		var a = int.Parse(args[2]);
		var b = int.Parse(args[3]);

		if(a <= ((float)b / (float)m))
		{
			Console.Write(n * a);
		}
		else {
			var total = 0;

			while(n > 0){

			  if((n-m) < 0)
			  {
				 Console.Write(total + (n * a));
				 return;
			  }

			  total += (b);
     		  n -= m;
			}

			Console.Write(total);
		}
	}
}


using System;

namespace problem_430A
{
	class Program
	{
		static void Main(string[] args)
		{
			string s = Console.ReadLine();
			char c = s[s.Length - 1];
			s = Console.ReadLine().Replace(" ", "");
			int max = 0;
			for (int i = 1; i < s.Length; i++)
			{
				if (s[i] != c || s[i - 1] != c)
				{
					continue;
				}
				int l = i - 2, r = i + 1, cur = 2;
				while (l >= 0 && r < s.Length)
				{
					char tc = s[r];
					int t = 0;
					while (l >= 0 && s[l] == tc)
					{
						l--;
						t++;
					}
					while (r < s.Length && s[r] == tc)
					{
						r++;
						t++;
					}
					if (t < 3)
					{
						break;
					}
					else
					{
						cur += t;
					}
				}
				if (cur > max)
				{
					max = cur;
				}
			}
			Console.Write(max);
		}
	}
}


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

namespace B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] data = Console.ReadLine().Split(' ');
            int n = Convert.ToInt32(data[0]);
            int k = Convert.ToInt32(data[1]);
            int x = Convert.ToInt32(data[2]);

            data = Console.ReadLine().Split(' ');
            int[] c = new int[n];
            for (int i = 0; i < n; i++)
                c[i] = Convert.ToInt32(data[i]);

            int max = 0;
            for (int i = 1; i < n; i++)
            {
                if (c[i] != x || c[i - 1] != x)
                    continue;

                int l = i - 2, r = i + 1;
                int curr = 2;
                while (l >= 0 && r < n)
                {
                    int tmp = 0;
                    int q = c[r];
                    while (l >= 0)
                    {
                        if (c[l] == q)
                        {
                            l--;
                            tmp++;
                        }
                    }

                    while (r < n)
                    {
                        if (c[r] == q)
                        {
                            r++;
                            tmp++;
                        }
                    }

                    if (tmp < 3)
                        break;

                    curr += tmp;
                }

                if (max < curr)
                    max = curr;
            }

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


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

namespace ConsoleApp2
{
	class Program
	{
		static void Main(string[] args)
		{
			var number = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
			var friends = number[0];
			var bottles = number[1];
			var milliliters = number[2];
			var limes = number[3];
			var slices = number[4];
			var salt = number[5];
			var nl = number[6];
			var np = number[7];

			var totalDrink = bottles * milliliters;
			var toasts = totalDrink / friends;
			var toastsWithLimes = limes * slices;
			var toastsWithSalt = salt / np;

			Console.WriteLine(Math.Min(toasts, Math.Min(toastsWithLimes, toastsWithSalt)) / nl);
		}
	}
}


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

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

            string[] chysla = Console.ReadLine().Split(' ');
            int n = Int32.Parse(chysla[0]), k = Int32.Parse(chysla[1]), l = Int32.Parse(chysla[2]), c = Int32.Parse(chysla[3]), d = Int32.Parse(chysla[4]),
                p = Int32.Parse(chysla[5]), nl = Int32.Parse(chysla[6]), np = Int32.Parse(chysla[7]);
            int[] tosty = new int[3];
            tosty[0] = k * l/n;
            tosty[1] = c * d;
            tosty[2] = p / np;
            int k_tostiv = tosty.Min() / n;
            Console.WriteLine(k_tostiv);

        }
    }
}


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

namespace ConsoleApplication1
{
    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[] a = new int[3];
            int gas = k * l;
            int g = gas / n; a[0] = g;
            int lai = c * d; a[1] = lai;
            int soli = p / np; a[2] = soli;
            int min = 100000000;
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] < min) { min = a[i]; }
            }
            Console.WriteLine(min / n);

        }
    }
}


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

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

        private static void Main(string[] args)
        {
            long n = long.Parse(reader.ReadLine());

            n %= 360;

            if (n >= 0)
            {
                if (n <= 45)
                    writer.WriteLine("0");
                else if (n <= 45 + 90)
                    writer.WriteLine("1");
                else if (n <= 45 + 180)
                    writer.WriteLine("2");
                else
                    writer.WriteLine("3");
            }
            else
            {
                if (n >= -45)
                    writer.WriteLine("0");
                else if (n > -45 - 90)
                    writer.WriteLine("3");
                else if (n > -45 - 180)
                    writer.WriteLine("2");
                else
                    writer.WriteLine("1");
            }

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


using System;

namespace BigO_Chapter
{
    class Program
    {
        public static void Main(string[] args)
        {
            int Weight;

            Weight = Convert.ToInt32(Console.ReadLine());

            if (Weight < 1 || Weight > 100) return;

            if (Weight % 2 == 0)
            {
                if ((Weight / 2) % 2 == 0)
                {
                    Console.WriteLine("Yes");

                }
                else
                {
                    Console.WriteLine("Yes");
                    return;
                }
            }
            else
                Console.WriteLine("No");
        }


using System;
class Program
{
    static int Main()
    {
        int w = Int32.Parse(Console.ReadLine());
        if(w%%2=0){
        int a,b;
        a=w/2;
        b=w/2;
        if(a%2==0 && b%2==0)Console.WriteLine("YES");
            else Console.WriteLine("NO");
        }
        else Console.WriteLine("NO");
        return 0;
    }
}


using System;
class Program
{
    static int Main()
    {
        int w = Int32.Parse(Console.ReadLine());
        if (w % 2 == 0)
        {
            int a, b;
            a = w / 2;
            b = w / 2;
            if(a%0==1&&b%0==1) {
                a++;
                b--;
                if(a%0==0&&b%0==0) Console.WriteLine("YES");
            }
            else if(a%0==0&&b%0==0) Console.WriteLine("YES");
            else Console.WriteLine("NO");
        }
        else Console.WriteLine("NO");
        return 0;
    }
}


using System;

namespace ConsoleApp1
{
    class Program
    {

        static void Main(string[] args)
        {
            Console.WriteLine("Enter number: ");
            number = Convert.ToInt32(Console.ReadLine());

            if (number % 2 == 0)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }

            Console.ReadKey();

        }
    }
}


Console.Write("Enter the weight of the watermelon :");
            int x = Convert.ToInt32(Console.ReadLine());
            if (x % 2 == 0 && x!=0 && x>=1)
            {
                Console.WriteLine("yes");
            }
            else
            {
                Console.WriteLine("no");
            }


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeForces", "CodeForces\CodeForces.csproj", "{7214E0B5-3D6A-46CA-B703-896E5946EA69}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Debug|x86.ActiveCfg = Debug|x86
		{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Debug|x86.Build.0 = Debug|x86
		{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Release|x86.ActiveCfg = Release|x86
		{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
EndGlobal


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

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

            int x = 0;
            x =Int32.Parse( Console.ReadLine());
            var res=test(x);
        }

       public static string test(int i)
        {
            if (i>=1 && i<=100)
            {
                var res = i % 2;
                if (res == 0)
                {
                    var res2 = (i / 2) % 2;
                    if (res2 == 0)
                    {
                        return "YES";
                    }
                    else
                    {
                        return "NO";
                    }

                }
                else
                    return "NO";

            }

        }
    }
}


class Program{
    static void Main(string[] args){
        byte weight = 0;
        if(args.Length != 1 || !byte.TryParse(args[0], out weight)){
            Console.WriteLine("Invalid input");
            return;
        }

        Console.WrileLine((weight %2 == 0 && weight > 2) ? "YES" : "NO");
    }
}


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

namespace C_CS
{
    class C
    {
        static readonly Int64 MaxN = (Int64)1e18;
        static Int64[] Fibs;
        static void GetFib()
        {
            Fibs = new Int64[1024];
            Fibs[0] = 1;
            Fibs[1] = 1;
            for (Int32 i = 2; i < Fibs.Length; ++i)
            {
                Fibs[i] = Fibs[i - 2] + Fibs[i - 1];
            }
        }
        static void Main(String[] args)
        {
            GetFib();
            String input = Console.ReadLine();
            Int64 n = Int64.Parse(input);
            Int32 result = Array.IndexOf(Fibs, (from x in Fibs
                                                where x >= n
                                                select x).First()) - 2;
            Console.WriteLine("{0}\n", result);
            //Console.ReadKey();
        }
    }
}


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

    class PairVariable : IComparable<PairVariable>
    {
        public int a, b;
        public PairVariable()
        {

        }

        public PairVariable(string s)
        {
            string[] q = s.Split();
            a = int.Parse(q[0]);
            b = int.Parse(q[1]);
        }
        public PairVariable(int a, int b)
        {
            this.a = a;
            this.b = b;
        }
        public int CompareTo(PairVariable pv)
        {
            if (this.a > pv.a)
            {
                return 1;
            }
            else if (this.a < pv.a)
            {
                return -1;
            }
            else
            {
                if (this.b >= pv.b)
                {
                    return 1;
                }
                else
                {
                    return -1;
                }
            }
        }

    }

    namespace ConsoleApplication2
    {
        class Program
        {
            static void Main(string[] args)
            {
                string[] ss = Console.ReadLine().Split();
                long n = long.Parse(ss[0]);
                List<long> ans = new List<long>();
                long a = 1;
                long b = 2;
                ans.Add(a);
                ans.Add(b);
                while (true)
                {
                    long x = a + b;
                    ans.Add(x);
                    a = b;
                    b = x;
                    if (x > n)
                    {
                        break;
                    }
                }
                /*for (int i = 0; i < ans.Count; i++)
                {
                    Console.Write(ans[i]+" ");
                }*/
                //Console.WriteLine();
                for (int i = 0; i < ans.Count; i++)
                {
                    if (n < ans[i])
                    {
                        Console.WriteLine(i);
                        return;
                    }
                }

            }
        }
    }


using System;

namespace CSharp
{
    class _735C
    {
        public static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            int max = 1;

            int fp = 1;
            int fc = 2;

            do
            {
                fc = fp + fc;
                fp = fc - fp;

                if (fc <= n)
                {
                    max++;
                }
            } while (fc <= n);

            Console.WriteLine(max);
        }
    }
}


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

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

           long x = Convert.ToInt64(s[0]);
           long y = Convert.ToInt64(s[1]);
           long l = Convert.ToInt64(s[2]);
           long r = Convert.ToInt64(s[3]);

           long maxa = Convert.ToInt64(Math.Floor(Math.Log(r) / Math.Log(x)));
           long maxb = Convert.ToInt64(Math.Floor(Math.Log(r) / Math.Log(y)));

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

           for (long i = 0; i <= maxa; i++)
               for (long j = 0; j <= maxb; j++)
               {
                   long year=Convert.ToInt64(Math.Pow(x, i) + Math.Pow(y, j));
                   if (year>=l && year<=r)
                      years.Add(year);
               }

           years = years.OrderBy(n => n).ToList();
           long max=0;
           for (int i=1;i<years.Count;i++)
           {
               long len=years[i]-years[i-1]-1;
               if (len>max) max=len;
           }

           if (years.Count > 0)
           {
               if (l < years[0]) max = (long)Math.Max(max, years[0] - l);
               if (r > years.Last()) max = (long)Math.Max(max, r - years.Last());
           }
           else
           {
               max = r - l + 1;
           }
           Console.Write(max);
        }
    }
}


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

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

        private static void Main(string[] args)
        {
            long x = Next();
            long y = Next();

            long l = Next();
            long r = Next();

            var list = new List<long> {0,long.MaxValue};
            for (long i = 1; long.MaxValue/x > i; i *= x)
            {
                for (long j = 1; long.MaxValue/y > j; j *= y)
                {
                    if (long.MaxValue - i < j)
                        break;
                    list.Add(i + j);
                }
            }

            list.Sort();

            long max = 0;
            for (int i = 1; i < list.Count; i++)
            {
                if (list[i] <= r && list[i] >= l)
                    max = Math.Max(max, list[i] - Math.Max(l - 1, list[i - 1]) - 1);
                if (list[i - 1] <= r && list[i - 1] >= l)
                    max = Math.Max(max, Math.Min(r + 1, list[i]) - list[i - 1] - 1);
                if (list[i] > r && list[i - 1] < l)
                    max = Math.Max(max, r - l + 1);
            }

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

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


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

namespace Competitive
{
    class Program
    {

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

        static string ReadStr()
        {
            return Console.ReadLine();
        }

        static char ReadChr()
        {
            return Console.ReadKey().KeyChar;
        }

        static List<long> GetList(long x)
        {
            List<long> Xs = new List<long>();

            long num = 1;

            while (num <= 1e18)
            {
                Xs.Add(num);
                if ((double)x * num > 1e18)
                {
                    break;
                }

                num *= x;
            }

            return Xs;
        }

        static void Main(string[] args)
        {
            var t = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var x = t[0];
            var y = t[1];
            var l = t[2];
            var r = t[3];

            HashSet<long> hset = new HashSet<long>();

            List<long> Xs = GetList(x);
            List<long> Ys = GetList(y);

            foreach (var xx in Xs)
            {
                foreach (var yy in Ys)
                {
                    if (xx + yy >= l && xx + yy <= r)
                    {
                        hset.Add(xx + yy);
                    }
                }
            }

            long res = 0;

            long curr = l-1;

            foreach (var num in hset.OrderBy(z => z))
            {
                res = Math.Max(res, num - curr);
                curr = num;
            }

            res = Math.Max(res, r - curr);

            Console.WriteLine(res);
        }
    }
}


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

namespace Competitive
{
    class Program
    {

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

        static string ReadStr()
        {
            return Console.ReadLine();
        }

        static char ReadChr()
        {
            return Console.ReadKey().KeyChar;
        }

        static List<long> GetList(long x)
        {
            List<long> Xs = new List<long>();

            long num = 1;

            while (num <= 1e18)
            {
                Xs.Add(num);
                if ((double)x * num > 1e18)
                {
                    break;
                }

                num *= x;
            }

            return Xs;
        }

        static void Main(string[] args)
        {
            var t = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var x = t[0];
            var y = t[1];
            var l = t[2];
            var r = t[3];

            HashSet<long> hset = new HashSet<long>();

            List<long> Xs = GetList(x);
            List<long> Ys = GetList(y);

            foreach (var xx in Xs)
            {
                foreach (var yy in Ys)
                {
                    if (xx + yy >= l && xx + yy <= r)
                    {
                        hset.Add(xx + yy);
                    }
                }
            }

            long res = 0;

            long curr = l-1;

            foreach (var num in hset.OrderBy(z => z))
            {
                res = Math.Max(res, num - curr-1);
                curr = num;
            }

            res = Math.Max(res, r - curr);

            Console.WriteLine(res);
        }
    }
}


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

namespace CodeForces
{
    class Program
    {
        //a - 97
        public static void Main(string[] args)
        {
            long[] input = GetIntArr();
            long x = input[0];
            long y = input[1];
            long l = input[2];
            long r = input[3];

            bool[] arr = new bool[r - l + 1];

            long a = 1; //умножение на x
            while (true)
            {
                long b = 1; //умножение на y
                if (a + b > r)
                    break;
                while (true)
                {
                    if (a + b < l)
                    {
                        b *= y;
                        continue;
                    }
                    if (a + b > r)
                        break;
                    arr[a + b - l] = true;
                    b *= y;
                }
                a *= x;
            }

            int ans = 0;
            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] == false)
                {
                    int len = 0;
                    while (i < arr.Length && arr[i] == false)
                    {
                        len++;
                        i++;
                    }
                    if (len > ans)
                        ans = len;
                }

            }
            Console.WriteLine(ans);

        }

        public static int[] CountLetters(string s)
        {
            int[] sl = new int[26];
            for (int i = 0; i < s.Length; i++)
                sl[s[i] - 97]++;
            return sl;
        }

        public static void MoveRight(StringBuilder sb, int first, int last)
        {
            char c = sb[last];
            for (int i = last; i > first; i--)
                sb[i] = sb[i - 1];

            sb[first] = c;
        }

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

        public static long GetInt() { return Int64.Parse(Rw()); }
        public static long[] GetIntArr() { return Array.ConvertAll(Rw().Split(' '), Int64.Parse); }

        public static double GetDouble() { return Double.Parse(Rw()); }
        public static double[] GetDoubleArr() { return Array.ConvertAll(Rw().Split(' '), DoubleParse); }
        public static double DoubleParse(string s) { return Double.Parse(s, NumberStyles.Any, System.Globalization.CultureInfo.GetCultureInfo("en-US")); }

        public static void GetTwoInts(out long n, out long m)
        {
            long[] input = GetIntArr();
            n = input[0];
            m = input[1];
        }

        public const long Module = 1000000000 + 7;

    }
}


    using System;

    namespace reverseString
    {
        class Program
        {
            static void Main(string[] args)
            {
            while (true)
            {
                System.Int64 ans, rem, r, s;
                String str = Console.ReadLine();

                int len = str.Length;
                r = 0;
                for (int i = 0; i < len - 1; i++)
                {
                    r = r * 10 + str[i] - '0';
                }

               // Console.WriteLine("r is {0}", r);
                s = str[len - 1];

               // Console.WriteLine("s is {0}", s);

                rem = (r - 1) / 4;
              //  Console.WriteLine("rem is {0}", rem);

                ans = rem * 12;
              // Console.WriteLine("ans is {0}", ans);

                if (r % 2 == 0)
                {
                    ans += 6;
                    //Console.WriteLine("ans1 is {0}", ans);
                }

                if (r % 4 == 1 || r % 4 == 2)
                {
                    ans += r - 1;
                   // Console.WriteLine("ans2 is {0}", ans);
                }
                else if (r % 4 == 3 || r % 4 == 0)
                {
                    ans += r - 3;
                  //  Console.WriteLine("ans3 is {0}", ans);
                }

                if (s == 'a')
                {
                    ans += 4;
                   // Console.WriteLine("ans4 is {0}", ans);
                }
                else if (s == 'b')
                {
                    ans += 5;
                    Console.WriteLine("ans5 is {0}", ans);
                }
                else if (s == 'c')
                {
                    ans += 6;
                  //  Console.WriteLine("ans6 is {0}", ans);
                }
                else if (s == 'd')
                {
                    ans += 3;
                   // Console.WriteLine("ans is {0}", ans);
                }
                else if (s == 'e')
                {
                    ans += 2;
                   // Console.WriteLine("ans is {0}", ans);
                }
                else
                {
                    ans += 1;
                  //  Console.WriteLine("ans is {0}", ans);
                }

                Console.WriteLine(ans);

            }

        }
        }

}


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

public class Program
{
	public static void Main(string[] args)
	{
		string num = Console.ReadLine();
		string[] numArray = num.Split(null);

		long s = int.Parse(numArray[0]);
		long x = int.Parse(numArray[1]);

		string sum = Convert.ToString(s, 2);
		string xor = Convert.ToString(x, 2);

		int sumdiff = 0, xordiff = 0;
		if (sum.Length > xor.Length)
		{
			sumdiff = sum.Length - xor.Length;
		}
		{
			xordiff = xor.Length - sum.Length;
		}

		if (sumdiff > 0)
		{
			for (int i = 0; i < sumdiff; i++)
				xor = "0" + xor;
		}
		else
		{
			for (int i = 0; i < xordiff; i++)
				sum = "0" + sum;
		}

		sum = "1" + sum;
		xor = "1" + xor;

		char[] sumChar = sum.ToCharArray();
		char[] xorChar = xor.ToCharArray();

		int carry = 0;

		int[] possibilities = new int[xor.Length];

		for (int i = xor.Length - 1; i >= 0; i--)
		{
			if (xor[i] == '1')
			{
				if (sum[i] == '1')
				{
					possibilities[i] = 2;

					if (carry == 1)
					{
						Console.Write("0");
						return;
					}

					if (carry == -1)
					{
						possibilities[i + 1] = possibilities[i + 1] - 1;
					}

					carry = 0;
				}
				else
				{
					possibilities[i] = 2;

					if (carry == 0)
					{
						Console.Write("0");
						return;
					}

					if (carry == -1)
					{
						possibilities[i + 1] = possibilities[i + 1] - 1;
					}

					carry = 1;
				}
			}
			else
			{
				if (sum[i] == '1')
				{
					possibilities[i] = 2;

					if (carry == -1)
					{
						possibilities[i + 1] = possibilities[i + 1] - 1;
					}

					if (carry == 0)
					{
						Console.Write("0");
						return;
					}

					carry = -1;
				}
				else
				{
					possibilities[i] = 2;

					if (carry == 1)
					{
						Console.Write("0");
						return;
					}

					if (carry == -1)
					{
						possibilities[i + 1] = possibilities[i + 1] - 1;
					}

					carry = -1;
				}
			}
		}

		long answer = 1;
		for (int i = 1; i < possibilities.Length; i++)
		{
			answer = answer * possibilities[i];
		}

		if(s==x)
		{
			answer = answer - 2;
		}

			Console.Write(answer);
		}

}


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

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            string s = Console.ReadLine();
            long[] num = new long[s.Length];
            long[] pow = new long[10];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = s[i] - 48;
                for (long j = num[i]; j > 1; j--)
                {
                    pow[j]++;
                }
            }
            pow[2] += 2 * (pow[4]);
            pow[2] += pow[6];
            pow[3] += pow[3];
            pow[4] = 0;
            pow[6] = 0;
            pow[2] += 3 * pow[8];
            pow[8] = 0;
            pow[3] += 2 * pow[9];
            pow[9] = 0;
            for (int i = 0; pow[2]>0; i++)
            {
                if (pow[7] > 0)
                {
                    pow[7]--;
                    pow[5]--;
                    pow[3] -= 2;
                    pow[2] -= 4;
                    Console.Write("7");
                }
                else
                {
                    if (pow[5] > 0)
                    {
                        pow[5]--;
                        pow[3]--;
                        pow[2] -= 3;
                        Console.Write("5");
                    }
                    else
                    {
                        if (pow[3] > 0)
                        {
                            pow[3]--;
                            pow[2]--;
                            Console.Write("3");
                        }
                        else
                        {
                            pow[2]--;
                            Console.Write("2");
                        }
                    }
                }
            }
            Console.WriteLine();
            //1234
            //555
            //
            //

            //2-5
            //3-2
            //5-
            //7-

            //2
            //2-1
            //3
            //3-1,2-1
            //5
            //5-1 3-1 2-3
            //7
            //7-1 5-1 3-2 2-4

        }
    }
}


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

namespace ConsoleApplication3
{
    class Program
    {
       public static void Main(string[] args)
        {
            int i = 0;
            string h = "hello";

            List<char> l = Console.ReadLine().ToList();

            foreach (char ch in l) {
                if (ch == h[i])
                {
                    h = h.Remove(0, 1);
                }

            }

            if (h.Length <= 1)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }

        }
    }
}


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

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            List<char> wordChars = new List<char>(Console.ReadLine().ToCharArray());

            for (byte i = 0; i < wordChars.Count; i++)
            {
                if (wordChars[i] != 'h' && wordChars[i] != 'e' && wordChars[i] != 'l' && wordChars[i] != 'o')
                {
                    wordChars.RemoveAt(i);
                    i--;
                }
            }

            for (int i = 1; i < wordChars.Count; i++)
            {
                if (wordChars[i] == wordChars[i - 1])
                {
                    if (wordChars[i] != 'l')
                    {
                        wordChars.Remove(wordChars[i]);
                        i--;
                    }
                    else if (wordChars[i + 1] == 'l')
                    {
                        wordChars.Remove(wordChars[i]);
                        i--;
                    }
                }
            }

            if (wordChars.Count == 5)
            {
                if (string.Join("", wordChars.ToArray()) == "hello")
                    Console.WriteLine("YES");
                else
                    Console.WriteLine("NO");
                return;
            }
            else if (wordChars.Count < 5)
            {
                Console.WriteLine("NO");
                return;
            }

            Queue<string> fringe = new Queue<string>();
            fringe.Enqueue(string.Join("", wordChars.ToArray()));

            while (fringe.Peek().Length > 5)
            {
                for (int i = 0; i < fringe.Peek().Length; i++)
                {
                    List<char> _wordChars = new List<char>(fringe.Peek().ToList());
                    _wordChars.RemoveAt(i);

                    if (string.Join("", _wordChars.ToArray()) == "hello")
                    {
                        Console.WriteLine("YES");
                        return;
                    }

                    if (_wordChars.Contains('h') && _wordChars.Contains('e') && _wordChars.Contains('l') && _wordChars.Contains('o'))
                    {
                        string word = string.Join("", _wordChars.ToArray());
                        if (word.Contains("ll"))
                        {
                            if (!fringe.Contains(word))
                                fringe.Enqueue(word);
                        }
                    }
                }
                fringe.Dequeue();
            }
            Console.WriteLine("NO");
        }
    }
}


#region Using Statements
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

#endregion
namespace csConsoleforStudy
{
 using System.Collections.Generic;
 using System.Globalization;

 public class Printer : StreamWriter
 {
  public override IFormatProvider FormatProvider
  {
   get
   {
    return CultureInfo.InvariantCulture;
   }
  }

  public Printer(Stream stream): base (stream, new UTF8Encoding(false, true))
  {
  }

  public Printer(Stream stream, Encoding encoding): base (stream, encoding)
  {
  }
 }

 class Program
 {
  static readonly Encoding TargetEcoding = Encoding.Unicode;
  static void Main(string[] args)
  {
   OpenStream();
   Solver s = new Solver();
   s.Solve();
   CloseStream();
  }

  static void OpenStream()
  {
  }

  static void CloseStream()
  {
  }

  static void CheckMemory()
  {
  }
 }

 class Solver
 {
  public static readonly Encoding TargetEncoding = Encoding.Unicode;
  const int SIZE = 5005;
  private const double AbsoluteError = 1e-10;
  private const double RelativeError = 1e-8;
  static int mod = 1000000007;
  public void Solve()
  {
   var in1 = ria();
   int fx = in1[0];
   int fy = in1[1];
   int tx = in1[2];
   int ty = in1[3];
   int targetx = tx - fx + 1000000;
   int targety = ty - fy + 1000000;
   var in2 = ria();
   int a = 0;
   int b = 0;
   while (targetx > 0)
   {
    targetx -= in2[0];
    a++;
   }

   while (targety > 0)
   {
    targety -= in2[1];
    b++;
   }

   if ((a + b) % 2 == 0)
    Console.WriteLine("YES");
   else
    Console.WriteLine("NO");
  }

#region SolverUtils
  private static List<int> factorial = new List<int>(new int[]{1});
  private static int NextInt()
  {
   int c;
   int res = 0;
   do
   {
    c = Console.Read();
    if (c == -1)
     return res;
   }
   while (c < '0' || c > '9');
   res = c - '0';
   while (true)
   {
    c = Console.Read();
    if (c < '0' || c > '9')
     return res;
    res *= 10;
    res += c - '0';
   }
  }

  static string rs()
  {
   return Console.ReadLine();
  }

  static int ri()
  {
   return int.Parse(Console.ReadLine());
  }

  static uint rui()
  {
   return uint.Parse(Console.ReadLine());
  }

  static long rl()
  {
   return long.Parse(Console.ReadLine());
  }

  static ulong rul()
  {
   return ulong.Parse(Console.ReadLine());
  }

  static double rd()
  {
   return double.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
  }

  static string[] rsa()
  {
   return Console.ReadLine().Split(' ');
  }

  static int[] ria()
  {
   return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => int.Parse(e));
  }

  static uint[] ruia()
  {
   return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => uint.Parse(e));
  }

  static long[] rla()
  {
   return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => long.Parse(e));
  }

  static ulong[] rula()
  {
   return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => ulong.Parse(e));
  }

  static double[] rda()
  {
   return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => double.Parse(e));
  }

  static void ReadLineAndAssign(string type, params object[] p)
  {
   dynamic input;
   if (type.StartsWith("i"))
    input = ria();
   else if (type.StartsWith("l"))
    input = rla();
   else if (type.StartsWith("d"))
    input = rda();
   else
    throw new ArgumentException("no match " + type.ToString());
   for (int i = 0; i < p.Length; i++)
   {
    p[i] = input[i];
   }
  }

  static void SwapIfGreater<T>(ref T lhs, ref T rhs)where T : IComparable<T>
  {
   T temp;
   if (lhs.CompareTo(rhs) > 0)
   {
    temp = lhs;
    lhs = rhs;
    rhs = temp;
   }
  }

  static bool DoubleEqual(double a, double b)
  {
   double diff = Math.Abs(a - b);
   if (diff < AbsoluteError)
    return true;
   return diff <= RelativeError * Math.Max(Math.Abs(a), Math.Abs(b));
  }

  static dynamic abs(dynamic num)
  {
   return Math.Abs(num);
  }

  static dynamic max(dynamic a, dynamic b)
  {
   return Math.Max(a, b);
  }

  static void For(int start, int end, Action method)
  {
   for (int i = start; i < end; i++)
   {
    method.Invoke();
   }
  }

  static void For(int start, int end, Action<int> method, int i)
  {
   for (i = start; i < end; i++)
   {
    method.DynamicInvoke(i);
   }
  }

  static int C(int n, int k)
  {
   return P(n, k) / Factorial(k);
  }

  static int P(int n, int r)
  {
   return Factorial(n) / Factorial(n - r);
  }

  static int Factorial(int n)
  {
   if (factorial.Count <= n)
    factorial.Add(Factorial(n - 1) * n);
   return factorial[n];
  }

  static bool IsEven(int a)
  {
   return (a % 2) == 0;
  }

  static bool IsOdd(int a)
  {
   return !IsEven(a);
  }

  static int powmod(int a, int b)
  {
   if (b == 0)
    return 1;
   if (b == 1)
    return a;
   int i = powmod(a, b / 2);
   i *= i;
   i %= mod;
   if (b % 2 == 0)
    return i;
   else
    return ((i * a) % mod);
  }
#endregion
 }
#region SolverUtils
#endregion
#region Data Structure
#endregion
#region Algorithm
#endregion
#region Library Method/Fields
#region Members for Internal Support
#endregion Members for Internal Support
#region Public Properties
#endregion Public Properties
#region Public Instance Methods
#endregion Public Instance Methods
#region Constructors
#endregion Constructors
#region Public Static Methods
#endregion Public Static Methods
#region Operator Overloads
#endregion Operator Overloads
#region explicit conversions from BigRational
#endregion explicit conversions from BigRational
#region implicit conversions to BigRational
#endregion implicit conversions to BigRational
#region serialization
#endregion serialization
#region instance helper methods
#endregion instance helper methods
#region static helper methods
#endregion static helper methods
#region Exceptions
#endregion
#endregion
}
#region Libraries
#region operation methods
#endregion
#region Operators
#endregion
#region DataStructures
#region IComparable implementation
#endregion
#region Model
#endregion
#region Constructors
#endregion
#region Internal
#region IEqualityComparer implementation
#endregion
#endregion
#region IGraph implementation
#endregion
#region Clique invariants
#endregion
#region Clique methods
#endregion
#region IEquatable implementation
#endregion
#endregion
#region Algorithms
#endregion
#endregion


using System;

namespace _817A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] splitStr = Console.ReadLine().Split(' ');
            int startX = int.Parse(splitStr[0]);
            int startY = int.Parse(splitStr[1]);
            int finishX = int.Parse(splitStr[2]);
            int finishY = int.Parse(splitStr[2]);
            string[] splitStrStep = Console.ReadLine().Split(' ');
            int stepX = int.Parse(splitStrStep[0]);
            int stepY = int.Parse(splitStrStep[1]);

            if (Math.Abs(finishX - startX)%stepX != 0 || Math.Abs(finishY - startY)%stepY != 0)
            {
                Console.WriteLine("NO");
            }
            else
            {
                int countStepX = Math.Abs(finishX - startX) / stepX;
                int countStepY = Math.Abs(finishY - startY) / stepY;
                if (countStepX%2 == countStepY%2)
                {
                    Console.WriteLine("YES");
                }
                else
                {
                    Console.WriteLine("NO");
                }
            }
            Console.ReadLine();

        }
    }
}


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

namespace Codeforces
{
    class C
    {
        private static ThreadStart s_threadStart = new C().Go;
        private static bool s_time = false;

        public class Truple
        {
            public int a;
            public int b;
            public int c;
        }

        private void Go()
        {
            int n = GetInt();
            int m = GetInt();
            int k = GetInt();
            List<Truple>[] data = new List<Truple>[n];
            for (int i = 0; i < n; i++)
            {
                GetString();
                data[i] = new List<Truple>();
                for (int j = 0; j < m; j++)
                {
                    Truple tr;
                    data[i].Add(tr = new Truple());
                    tr.a = GetInt();
                    tr.b = GetInt();
                    tr.c = GetInt();
                }
            }
            int max = 0;
            Tuple<int, int>[] unitProfit = new Tuple<int, int>[m];
            for (int i = 0; i < n; i++)
            {
                for (int j = i+1; j < n; j++)
                {
                    var buy = data[i];
                    var sell = data[j];
                    for (int x = 0; x < m; x++)
                    {
                        unitProfit[x] = new Tuple<int, int>(sell[x].b - buy[x].a, x);
                    }
                    Array.Sort(unitProfit);
                    Array.Reverse(unitProfit);
                    int kk = k;
                    int localProfit = 0;
                    for (int y = 0; y < m && kk > 0 && unitProfit[y].Item1 > 0; y++)
                    {
                        int cap = buy[unitProfit[y].Item2].c;
                        localProfit += Math.Min(cap, kk) * unitProfit[y].Item1;
                        kk -= cap;
                    }

                    if (localProfit > max) max = localProfit;
                }
            }

            Wl(max);
        }

        #region Template

        public static void Main(string[] args)
        {
            System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
            Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);
            timer.Start();
            main.Start();
            main.Join();
            timer.Stop();
            if (s_time)
                Wl(timer.ElapsedMilliseconds);
        }

        private static IEnumerator<string> ioEnum;
        private static string GetString()
        {
            while (ioEnum == null || !ioEnum.MoveNext())
            {
                ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();
            }

            return ioEnum.Current;
        }

        private static int GetInt()
        {
            return int.Parse(GetString());
        }

        private static long GetLong()
        {
            return long.Parse(GetString());
        }

        private static double GetDouble()
        {
            return double.Parse(GetString());
        }

        private static List<int> GetIntArr(int n)
        {
            List<int> ret = new List<int>(n);
            for (int i = 0; i < n; i++)
            {
                ret.Add(GetInt());
            }
            return ret;
        }

        private static void Wl<T>(T o)
        {
            if (o is double)
            {
                Wld((o as double?).Value, "");
            }
            else if (o is float)
            {
                Wld((o as float?).Value, "");
            }
            else
                Console.WriteLine(o.ToString());
        }

        private static void Wl<T>(IEnumerable<T> enumerable)
        {
            Wl(string.Join(" ", enumerable.Select(e => e.ToString()).ToArray()));
        }

        private static void Wld(double d, string format)
        {
            Wl(d.ToString(format, CultureInfo.InvariantCulture));
        }

        public struct Tuple<T, K> : IComparable<Tuple<T, K>>
            where T : IComparable<T>
            where K : IComparable<K>
        {
            public T Item1;
            public K Item2;

            public Tuple(T t, K k)
            {
                Item1 = t;
                Item2 = k;
            }

            public override bool Equals(object obj)
            {
                var o = (Tuple<T, K>)obj;
                return o.Item1.Equals(Item1) && o.Item2.Equals(Item2);
            }

            public override int GetHashCode()
            {
                return Item1.GetHashCode() ^ Item2.GetHashCode();
            }

            public override string ToString()
            {
                return "(" + Item1 + " " + Item2 + ")";
            }

            #region IComparable<Tuple<T,K>> Members

            public int CompareTo(Tuple<T, K> other)
            {
                int ret = Item1.CompareTo(other.Item1);
                if (ret != 0) return ret;
                return Item2.CompareTo(other.Item2);
            }

            #endregion
        }

        #endregion
    }
}


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

namespace for_codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            Console.WriteLine(((n % 2) == 0) && ( n!= 2)) ? "YES" : "NO");
        }
    }
}


using System;
using System.IO;

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

			if (input == 2)
            {
                Console.WriteLine(_no);
                return;
            }

            switch (input % 2)
            {
                case 0:
                    Console.WriteLine("YES");
                    break;
                case 1:
                    Console.WriteLine("NO");
                    break;
            }
        }
    }
}


using System;
using System.Linq;

namespace _4A
{
    class Program
    {
        static void Main(string[] args)
        {
            int res = int.Parse(args.First());
            if (res % 2 == 0){
                Console.WriteLine("YES");
            } else {
                Console.WriteLine("NO");
            }
        }
    }
}


n = int(input());

if (n > 1 && n % 2 == 0);
    print("YES");
else
    print("NO");


     public static void Watermelon(int arg)
        {
            if (arg >= 4 && arg % 2 == 0)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }

        }


using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            if(Int16.Parse(args[0]) %2 == 0)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }
    }
}


<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

</Project>


using System;

namespace ConsoleApp6

{

    public class Program
    {
        static void Main()
        {
            int input = int.Parse(Console.ReadLine());
            if (input % 2 != 0 || input == 2)
            {
                Console.WriteLine("No");
            }
            else
            {
                Console.WriteLine("Yes");
            }

        }
}


internal class Program
    {
        private static void Main(string[] args)
        {
            var input = int.Parse(Console.ReadLine());
            if (input % 2 == 0)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }

            Console.ReadKey();
        }
    }


using System;

namespace watermilon
{
    class Program
    {
        static void Main(string[] args)
        {
            int w = Console.ReadLine();

            if (w > 3 && w < 101 )

            {
                if (w % 2 == 0)
                {
Console.Write("YES");
                }

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


            int weight = int.Parse(Console.ReadLine());
            if (weight % 2 == 0)
            {
                Console.WriteLine("YES");
            } else
            {
                Console.WriteLine("NO");
            }


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "задача арбузы", "задача арбузы\задача арбузы.csproj", "{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {7958668B-6340-414D-B092-7FE1A34A16A3}
	EndGlobalSection
EndGlobal


public void DivisisbleByEven(int weight)
        {
            if (weight / 2)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }


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

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            int weight = 0;
            string w;
            w = Console.ReadLine();
            bool result = int.TryParse(w, out weight);
            weight = weight - 2
            if (result == true && weight >=1 && weight <=100)
            {
            if ( weight % 2 == 0)
            {
                Console.WriteLine("YES");
            } else {
                Console.WriteLine("NO");
            }
            }

        }
    }
}


using System;

namespace codeforces1
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            UInt16 w = Convert.ToUInt16(Console.ReadLine());
            if(w % 2 == 0){
                w /= 2;
                if(w % 2 == 0){
                    Console.WriteLine("Yes");
                }
                else{
                    UInt16 one = w - 1;
                    if((one != 0) && (one % 2) == 0){
                        UInt16 two = w + 1;
                        if((two != 0) && (two % 2) == 0){
                            Console.WriteLine("Yes");
                        }
                        else{
                            Console.WriteLine("No");
                        }
                    }
                    else{
                        Console.WriteLine("No");
                    }
                }
            }
            else{
                Console.WriteLine("No");
            }
        }
    }
}


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

namespace ProgrammingContest.Codeforces.Round82 {
    class C {
        static void Main() {
            var xs = Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), int.Parse);
            int n = xs[0],
                m = xs[1],
                c0 = xs[2],
                d0 = xs[3];
            List<int[]>zs = new List<int[]>();
            for (int i = 0; i < m; i++) {
                var ys = Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), int.Parse);
                int d = ys[0] / ys[1];
                zs.Add(new int[] { d * ys[2], d * ys[3] });
            }

            for(int i = 1; i*c0 <= n; i++)
                zs.Add(new int[] { i * c0, i * d0 });

            zs.Sort((a, b) => -(a[1] / a[0] - b[1] / b[0]));
            int res = 0, rest = n;
            for (int i = 0; rest > 0 && i < zs.Count; i++) {
                if (rest >= zs[i][0]) {
                    rest -= zs[i][0];
                    res += zs[i][1];
                }
            }

            Console.WriteLine(res);
        }
    }
}


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

namespace Pr1
{
    class Program
    {
        static bool prostoe(int a)
        {
            for(int i=2;i*i<=a;i++)
                if(a%i==0)
                    return false;
            return true;
        }
        static void Main()
        {
            int n=Convert.ToInt32(Console.ReadLine());
            string s=Console.ReadLine(),q="";
            int[] a=new int [11];
            for(int i=0;i<n;i++)
            {
                int k=(int)Char.GetNumericValue(s[i]);
                if(k>1)
                    for(int j=k;j>=2;j--)
                    {
                        if(!prostoe(j))
                        {
                            int u=j;
                            while(u%2==0)
                            {
                                a[2]++;
                                u/=2;
                            }
                            while(u%3==0)
                            {
                                a[3]++;
                                u/=3;
                            }
                        }
                        else
                        {
                            a[j]++;
                            break;
                        }

                    }
            }
            for(int i=9;i>=2;i--)
            {
                while(a[i]!=0)
                {
                    a[i]--;
                    q+=i;
                }
            }

            Console.Write(q);

        }

    }
}


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

namespace tren
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
            string s = Console.ReadLine();
            string res = "";
            Dictionary<char, string> d = new Dictionary<char, string>();
            d.Add('2', "2");
            d.Add('3', "3");
            d.Add('4', "322");
            d.Add('5', "5");
            d.Add('6', "53");
            d.Add('7', "7");
            d.Add('8', "7222");
            d.Add('9', "7332");
            for (int i = 0; i < s.Length; i++)
            {
                if(s[i] != '1' && s[i] != '1')
                res += d[s[i]];
            }
            char[] c = res.ToCharArray();
            c = c.OrderByDescending(x => x).ToArray();
            foreach(char ch in c) Console.Write(ch);
        }
    }
}


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

namespace ConsoleApplication35
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();
            int u = 0, d = 0,l=0,r=0,co=0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i]=='U')
                {
                    u++;
                }
                else if (s[i] == 'D')
                {
                    d++;
                }
                else if (s[i] == 'R')
                {
                    r++;
                }
                else if (s[i] == 'L')
                {
                    l++;
                }
            }
            if (u>0 && d>0 && u==d)
            {
                co += u + d;
            }
            else if (u != 0 && d != 0)
            {
                co += Math.Max(u, d);
            }
            if (l > 0 && r > 0 && r==l)
            {
                co += l+ r;
            }
            else if(l!=0 && r!=0)
            {
                co += Math.Max(l, r);
            }
            Console.WriteLine(co);
        }
    }
}


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

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

            int length_of_sequence ;
            int maximum_possible_number=0;
            int sumY=0;
            int sumX = 0;
            int count = 0;
            string temp;
            temp = Console.ReadLine();
            length_of_sequence  = Convert.ToInt32(temp);
            string sequence = System.Console.ReadLine();

            foreach (char c in sequence)
            {
                if(c=='D') sumY--;
                else if (c == 'U') sumY++;
                else if (c == 'L') sumX--;
                else sumX++;
                count++;
                if(sumX==0 && sumY==0)
                {
                    maximum_possible_number = count;
                    break;
                }
            }

            //System.Console.WriteLine("Sum Y=" + sumY++);
            //System.Console.WriteLine("Sum X="+sumX++);
            System.Console.WriteLine(maximum_possible_number);
            //System.Console.ReadLine();

        }
    }
}


using System;

class Program
{
    static void Main(string[] args)
    {
        int w = int.Parse(Console.ReadLine());
        Console.WriteLine(w % 2 ? "YES" : "NO");
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arbuz_01", "arbuz_01\arbuz_01.csproj", "{B7A39387-4E95-43B4-BE96-7057A8E7B587}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "watermelon", "watermelon\watermelon.csproj", "{B8B98514-195E-4417-84F5-ED14B9450660}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B8B98514-195E-4417-84F5-ED14B9450660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B8B98514-195E-4417-84F5-ED14B9450660}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B8B98514-195E-4417-84F5-ED14B9450660}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B8B98514-195E-4417-84F5-ED14B9450660}.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;
using System.Threading.Tasks;

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

          int  w = int32.Parse(Console.ReadLine());
            if (w % 2 == 0 && w>2)
                Console.Write("YES");
            else
                Console.Write("NO");
        }
    }
}


using System;

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

            int[] Arr = new int[3];
            Arr[0] = int.Parse(Console.ReadLine());
            Arr[1] = int.Parse(Console.ReadLine());
            Arr[2]=int.Parse(Console.ReadLine());

            Array.Sort(Arr);

            Console.WriteLine((Arr[1]-Arr[0])+(Arr[2]-Arr[1]));
            Console.Read();

        }
    }
}


using System;
using System.Collections.Generic;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main()
        {
            int n = Int32.Parse(Console.ReadLine());
            string[] numbers = Console.ReadLine().Split(' ');
            int[] array = new int[n+1];
            for (int i = 1; i <= n; i++)
                array[i] = int.Parse(numbers[i-1]);

            int min = array[1],
                imin = 1,
                max = array[1],
                imax = 1;

            for (int i = 1; i <= n; i++)
            {
                if (array[i] < min)
                {
                    min = array[i];
                    imin = i;
                }
                if (array[i] > max)
                {
                    max = array[i];
                    imax = i;
                }
            }

            int dist = Math.Min(imax - 1, n - imax);
            int dist2 = Math.Min(imin - 1, n - imin);
            Console.WriteLine(Math.Max(imax, imin) -
                              Math.Min(imax, imin) +
                              Math.Max(dist, dist2));
            //Console.ReadKey();
        }
    }
}


using System;

namespace Contest
{
    class Program
    {
        public static void Main()
        {
            string[] ss = Console.ReadLine().Split(' ');
int a = Convert.ToInt32(ss[0]);
int b = Convert.ToInt32(ss[1]);
int c = Convert.ToInt32(ss[2]);
int Max = -1;
int Min = 101;
if (a > Max)
Max = a;
if (b > Max)
Max = b;
if (c > Max)
Max = c;
if (a < Min)
Min = a;
if (b < Min)
Min = b;
if (c < Min)
Min = c;
Console.WriteLine((Max+Min)/2);
        }
    }
}


using System;

namespace Contest
{
    class Program
    {
        public static void Main()
        {
            string[] ss = Console.ReadLine().Split(' ');
int a = Convert.ToInt32(ss[0]);
int b = Convert.ToInt32(ss[1]);
int c = Convert.ToInt32(ss[2]);
int Max = -1;
int Min = 101;
If (a > Max)
Max = a;
If (b > Max)
Max = b;
If (c > Max)
Max = c;
If (a < Min)
Min = a;
If (b < Min)
Min = b;
If (c < Min)
Min = c;
Console.WriteLine((Min+Max)/2);
        }
    }
}


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

namespace timusCsharp //1
{
    static class Program
    {
        static void Main()
        {
			var ret = 0;
            int a = Int32.Parse(Console.ReadLine());
			double y = Int32.Parse(Console.ReadLine());
			double z = Int32.Parse(Console.ReadLine());
			int b = Math.Floor(y/2);
			int c = Math.Floor(z/4);
			int[] arr = {a, b*2, c*4};
			int crit = arr.ToList().IndexOf(arr.Max());
			if (crit == 1) ret = a*7;
			if (crit == 2) ret = b*7;
			if (crit == 3) ret = c*7;

            Console.WriteLine(ret);
        }
    }
}


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

namespace Zad
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] arr = new string[3];

            arr = Console.ReadLine().Split();
            int A, B,C,i;
            A = Convert.ToInt32(arr[0]);
            B = Convert.ToInt32(arr[1]);
            C = Convert.ToInt32(arr[2]);
            for (i = A; i >= -1; i--)
                if (B >= 2 * i && C >= 4 * i)
                    break;
                Console.WriteLine(7*i);

        }
    }
}


using System;
using System.Diagnostics.CodeAnalysis;

namespace ConsoleTest
{
    class Program
    {

        static void Main()
        {
            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());
            int c = int.Parse(Console.ReadLine());
            int sum = 0;
            for (int i = a; i >= 0; i--)
            {
                if (b >= 2*i && c >= 2*i)
                {
                    sum = 7 * i;
                    break;
                }
            }
            Console.WriteLine(sum);
        }
    }
}


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

namespace cf
{
    class compote
    {
        static void Main(string[] args)
        {

            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());
            int c = int.Parse(Console.ReadLine());
            int r = 0;
            for ( int x =0; x<=a  ;x++ )
            {
                if (a >= 1 && b>=2 && c>=4)
                {
                    a -= 1;
                    b -= 2;
                    c -= 4;
                    r += 7;
                }

            }
            Console.WriteLine(r);
        }

    }
}


class check

{
    public static void Main()
    {
        int a=int.Parse(Console.ReadLine());
        if(a%2==0)
        {
            Console.WriteLine("YES");
        }
        else
        {
                        Console.WriteLine("NO");

        }
    }
}


using System;
using System.Net;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;

namespace Dela.Mono.Examples
{
   class GoogleSearch
   {
      static void Main(string[] args)
      {
         Console.WriteLn(args[2]);
      }
   }
}


using System;
using System.Net;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;

namespace Dela.Mono.Examples
{
   class GoogleSearch
   {
      static void Main(string[] args)
      {
          Console.WriteLine(args[0]);
      }
   }
}


using System;
public class Program
{
    static void Main(String[]Args)
    {
        int a = Convert.Int32(Console.ReadLine());
        if(a<=2) Console.WriteLine("NO");
        if(a%2==0)Console.Write("YES");
        else Console.WriteLine("NO");
    }
}


using System;
class Program{
    static void Main(){
        int x = int.Parse(Console.ReadLine());
        Console.WriteLine(x > 2 && (x & 1) == 0 ? "YES", "NO");
    }
}


using System;

class Program
{
    static void Main(string[] args)
    {
        int num = int.Parse(args[0]);
        if (num < 4)
        {
            Console.WriteLine("False");
        }
        else
        {
            int shift = num >> 1;
            shift = shift << 1;
            Console.WriteLine(shift == num);

        }

    }
}


using System;

class Program
{
    static void Main()
    {
        int num = Convert.ToInt32(Console.ReadLine());
        if (num < 4)
            {
                System.Console.WriteLine("No");
            } else {
                int shift = num >> 1;
                shift = shift << 1;
                if (shift == num) {
                    answer = "yes";
                } else {
                    answer = "no";
                }
                System.Console.WriteLine(answer);
            }
    }
}


using System;

class Program
{
    static void Main()
    {
        int num = Convert.ToInt32(Console.ReadLine());
        string answer="No";
        if (!num < 4)
        {
            int shift = num >> 1;
            shift = shift << 1;
            answer = shift == num ? "Yes" : "No";

        }
        System.Console.WriteLine(answer);
    }
}


using System;
using System.IO;

class Solution
{
 static string Even(int n)
 {
     string ans="NO";
     if(n%2==0)
     {
         ans="YES"
     }
     return ans;
 }

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

      if(n>=1&&n<=100)
      {
          string final=Even(n);
           Console..WriteLine(final);
      }
      else
      {
          goto l;
      }
  }
}


using System;
namespace MON_PROJEC1
{
    class Program
    {
        static void Main(string[] args)
        {
            int w     ;
            Console.WriteLine("the weight of the watermelon bought");
            w = int.Parse(Console.ReadLine());

            while(1 < w  || w  >100)
            {
                Console.WriteLine("the weight of the watermelon bought");
                w = int.Parse(Console.ReadLine());
            }

   if (w % 2 ==0 )
            {
                Console.WriteLine("yes");

            }

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

        }
    }
}


using System;

namespace MON_PROJEC1
{
    class Program
    {
        static void Main(string[] args)
        {
            int w   ;
            Console.WriteLine("");
            w = int.Parse(Console.ReadLine());

}

                if ( w> 2    && w % 2 == 0)
                {
                    Console.WriteLine("YES");

                }

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

        }
    }
}


using System;

class Program
{
    static void Main()
    {
        int w;
        w=Convert.Toint32(Console.ReadLine()) ;
        if(w%2==1)
            Console.Write("NO");
        else
            Console.Write("YES");
    }
}


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

namespace watermelon
{
    class Program
    {
        static void Main(string[] args)
        {
            int pices;
            if( pices >= 1 && pices<=100)
            {
                if(pices %2==0)
                {
                    Console.WriteLine("Yes");
                }
                Console.WriteLine("No");
            }
        }
    }
}


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

            int W;
            Console.Write("Weight of the watermelon: ");
            W = int.Parse(Console.ReadLine());
            if (W%2==0)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
            } while (true);

        }
    }


using System;

namespace A._watermelon
{
    class Program
    {
        static void Main(string[] args)
        {
            do
            {

            int W;
            Console.Write("Weight of the watermelon: ");
            W = int.Parse(Console.ReadLine());
            if (W%2==0)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
            } while (true);

        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 0;
            string[] input = Console.ReadLine().Split(' ');
            int x = int.Parse(input[0]);
            int y = int.Parse(input[1]);
            int a = int.Parse(input[2]);
            int b = int.Parse(input[3]);
            if (x == 1 && y == 1)
                Console.WriteLine(b - a + 1);
            else
            {
                while (true)
                {
                    if (a % x == 0 && a % y == 0)
                        break;
                    a++;
                }
                for (int i = a; i <= b; i += y)
                {
                    if (i % x == 0 && i % y == 0)
                        count++;
                }
                Console.WriteLine(count);
            }
            Console.ReadLine();
        }
    }
}


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

namespace ZODACHA
{
    class Program
    {
        static int GetIdent(string dnk)
        {
            int count = 0, ofs = 0;
            char ch = '0';

            for (int i = 0; i < dnk.Length; i++)
            {
                if (ch == '0')
                {
                    ch = dnk[i];
                    count++;
                }
                else
                {
                    if (ch == dnk[i])
                    {
                        count++;
                        continue;
                    }
                    else if (count % 2 == 0)
                    {
                        ch = '0';
                        ofs++;
                        count = 1;

                        continue;
                    }
                    else
                    {
                        ch = '0';
                        count = 1;

                        continue;
                    }
                }
            }

            if (count % 2 == 0)
                ofs++;

            return ofs;
        }

        static void Main(string[] args)
        {
            string dnk = Console.ReadLine();
            Console.WriteLine(GetIdent(dnk));
        }
    }
}


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

namespace cf
{
    class Program
    {

        static void Main(string[] args)
        {
            try
            {
                string s = Console.ReadLine();
                int c = 0;
                int x = 0;
                for (int i = 0; i < s.Length-1; i++)
                {
                    if (s[i] == s[i + 1])
                        x++;
                    else
                    {
                        x++;
                        if (x % 2 == 0)
                            c++;
                        x = 0;
                    }
                }
                Console.WriteLine(c);
                Console.ReadKey();
            }
            catch { }
            }

    }
}


using System;

namespace OlympApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string n = Console.ReadLine();
            int i = 0;
            while (n[i] != 'h' && i < n.Length)
            {
                i++;
            }
            if (n[i] != 'h')
            {
                Console.WriteLine("NO");
                return;
            }
            while (n[i] != 'e' && i < n.Length)
            {
                i++;
            }
            if (n[i] != 'e')
            {
                Console.WriteLine("NO");
                return;
            }
            while (n[i] != 'l' && i < n.Length)
            {
                i++;
            }
            if (n[i] != 'l')
            {
                Console.WriteLine("NO");
                return;
            }
            i += i < n.Length ? 1 : 0;
            while (n[i] != 'l' && i < n.Length)
            {
                i++;
            }
            if (n[i] != 'l')
            {
                Console.WriteLine("NO");
                return;
            }
            while (n[i] != 'o' && i < n.Length)
            {
                i++;
            }

            if (n[i] != 'o')
            {
                Console.WriteLine("NO");
                return;
            }

            Console.WriteLine("YES");

        }
    }
}


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

namespace Chat_Room___Guloso
{
    static class Operacao
    {
        private static int k = 0; //variável de controle para letras desejadas encontradas
        private static string[] frase = { "h", "e", "l", "l", "o" }; //string buscada

        public static void TesteChatRoom(string s) //funcionamento do algoritmo
        {
            for (int i = 0; i < s.Length; i++) //percorrer a string inserida pelo usuário
            {
                if (frase[k] == Convert.ToString(s[i])) //se a letra na string digitada é equivalente a letra na string procurada
                {
                    k++; //prosegue para a próxima letra da string digitada

                    if (k == 5) //se o contador chegar em 5 -> "hello" encontrado
                    {
                        Console.WriteLine("YES"); //exibe confirmação
                        break; //interrompe o algoritmo
                    }
                }
            }
            //acabando de percorrer a string
            if (k < 5) //Se o contador de controle for menor que 5
                Console.WriteLine("NO"); //mensagem de negação -> palavra não encontrada
        }
    }
}


using System;

namespace codility
{
    class Program
    {

        public static string solution(string s)
        {
            string a = "hello";
            var counter = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (counter == 5)
                    return "Yes";

                if (s[i] == a[counter])
                    counter++;
            }
            if (counter == 5)
                return "Yes";
            return "No";

        }
        static void Main(string[] args)
        {
            Console.WriteLine(solution(args[0]));
            Console.ReadLine();
        }

    }
}


   class Program
    {

        public static string solution(string s)
        {
            string a = "hello";
            var counter = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (counter == 5)
                    return "Yes";

                if (s[i] == a[counter])
                    counter++;
            }
            if (counter == 5)
                return "Yes";
            return "No";

        }
        static void Main(string[] args)
        {
            var a = "ahhellllloou";
            Console.WriteLine(solution(args[0]));
            Console.ReadLine();
        }


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

namespace A.Chat_room
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string Hello = "hello";
            int index = 0;
            for (int i = 0; i < input.Length; i++)
            {
                if (input[i]==Hello[index])
                {
                    index++;
                }
            }
            Console.WriteLine(index == 4 ? "YES" : "NO");
        }
    }
}


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

namespace chatroom
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string name = "hello";

            int j=0;
            for (int i = 0; i < input.Length; i++)
            {
                if(input[i]==name[j])
                {
                    j++;
                }
            }
            if (j >= 5)
            {
                Console.WriteLine("YES");
            }
            else
                Console.WriteLine("NO");
        }
    }
}


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

namespace CF2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int in1, in3, in5;
            in1 = s.IndexOf('h');
            in5 = s.LastIndexOf('o');
            if (in1 > in5) Console.WriteLine("NO");
            else
            {
                s = s.Substring(in1, in5 - in1 + 1);

                in1 = s.IndexOf('e');
                in5 = s.LastIndexOf('l');
                if (in1 > in5) Console.WriteLine("NO");
                else
                {
                    s = s.Substring(in1, in5 - in1 + 1);
                    in1 = s.IndexOf('e');
                    in5 = s.LastIndexOf('l');

                    in3 = s.IndexOf('l');
                    Console.WriteLine(in3==in5? "NO" :"YES");

                }
            }

        }
    }
}


using System;

namespace ChatRoom
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine().ToLower();
            int counter = 0;
            string result = "NO";

            foreach (char chara in line)
            {
                if ((counter == 0 && chara == 'h')
                    || (counter == 1 && chara == 'e')
                    || ((counter == 2 || counter == 3) && chara == 'l'))
                {
                    counter++;
                    lastChar = chara;
                }
                else if (counter == 4 && chara == 'o')
                {

                    result = "YES";
                    break;
                }

            }

            Console.WriteLine(result);
        }
    }
}


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)
        {
            var Word = Console.ReadLine();
            var Letter1 = Word.IndexOf("h", 0);
            var Letter2 = Word.IndexOf("e", Letter1);
            var Letter3 = Word.IndexOf("l", Letter2);
            var Letter4 = Word.LastIndexOf("l");
            var Letter5 = Word.IndexOf("o", Letter4);
            var Punkty = 0;

            if (Letter1 < Letter2)
                    Punkty++;
            if (Letter2 > Letter1)
                Punkty++;
            if (Letter3 > Letter2)
                 Punkty++;
            if (Letter4 > Letter3)
               Punkty++;
            if (Letter5 > Letter4)
              Punkty++;

           //  Console.WriteLine(Letter1); Console.WriteLine(Letter2); Console.WriteLine(Letter3); Console.WriteLine(Letter4);Console.WriteLine(Letter5);
            //Console.WriteLine("PKT!! " + Punkty);
            if (Punkty == 5)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");

        }
    }
}


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

namespace Hello2
{
    class Program
    {
        static void Main(string[] args)
        {
            var word1 = Console.ReadLine(); //hello
            var word2 = "hello";

            var c = 0;

            foreach (var item in word1)
            {
                if (item == word2[c])
                    c++;
            }
            if (c == 5)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");

        }
    }
}