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

namespace Test
{
    class IOHelper : IDisposable
    {
        StreamReader reader;
        StreamWriter writer;

        public IOHelper(string inputFile, string outputFile, Encoding encoding)
        {
            StreamReader iReader;
            StreamWriter oWriter;
            if (inputFile == null)
                iReader = new StreamReader(Console.OpenStandardInput(), encoding);
            else
                iReader = new StreamReader(inputFile, encoding);

            if (outputFile == null)
                oWriter = new StreamWriter(Console.OpenStandardOutput(), encoding);
            else
                oWriter = new StreamWriter(outputFile, false, encoding);

            reader = iReader;
            writer = oWriter;

            curLine = new string[] { };
            curTokenIdx = 0;
        }

        string[] curLine;
        int curTokenIdx;

        char[] whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        public string ReadNextToken()
        {
            if (curTokenIdx >= curLine.Length)
            {
                //Read next line
                string line = reader.ReadLine();
                if (line != null)
                    curLine = line.Split(whiteSpaces, StringSplitOptions.RemoveEmptyEntries);
                else
                    curLine = new string[] { };
                curTokenIdx = 0;
            }

            if (curTokenIdx >= curLine.Length)
                return null;

            return curLine[curTokenIdx++];
        }

        public int ReadNextInt()
        {
            return int.Parse(ReadNextToken());
        }

        public double ReadNextDouble()
        {
            var nextToken = ReadNextToken();
            var result = 0.0;
            nextToken = nextToken.Replace(".", System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator);
            result = double.Parse(nextToken);
            return result;
        }

        public void Write(string stringToWrite)
        {
            writer.Write(stringToWrite);
        }

        public void WriteLine(string stringToWrite)
        {
            writer.WriteLine(stringToWrite);
        }

        public void WriteLine(double valueToWrite)
        {
            long intPart = (long)valueToWrite;
            double fracPart = valueToWrite - intPart;
            var fracPartStr = fracPart.ToString();
            if (fracPartStr.Length > 1)
                fracPartStr = fracPartStr.Substring(2);
            var strToWrite = string.Format("{0}.{1}", intPart, fracPartStr);
            writer.WriteLine(strToWrite);
        }

        public void Dispose()
        {
            try
            {
                if (reader != null)
                {
                    reader.Dispose();
                }
                if (writer != null)
                {
                    writer.Dispose();
                }
            }
            catch { };
        }

        public void Flush()
        {
            if (writer != null)
            {
                writer.Flush();
            }
        }
    }

    class Program
    {
        protected IOHelper ioHelper;

        int n;

        public void Solve()
        {
            n = ioHelper.ReadNextInt();

            int curNS = 0;
            int curEV = 0;

            bool bOK = true;

            while(n>0)
            {
                var dist = ioHelper.ReadNextInt();
                var dir = ioHelper.ReadNextToken();

                if(dir=="North")
                {
                    if (curNS == 0)
                        curNS = -1;
                    else
                        curNS -= dist;
                    if(curNS<0)
                    {
                        bOK = false;
                        break;
                    }
                }
                else if (dir=="South")
                {
                    if (curNS == 20000)
                        curNS++;
                    else
                        curNS += dist;
                    if(curNS>20000)
                    {
                        bOK = false;
                        break;
                    }
                }
                else
                {
                    if (curNS == 0 || curNS == 20000)
                    { bOK = false; break; }
                n--;
            }

            if (curNS != 0)
                bOK = false;

            if (bOK)
                ioHelper.WriteLine("YES");
            else
                ioHelper.WriteLine("NO");
            ioHelper.Flush();

            //Console.ReadKey();
        }

        public Program(string inputFile, string outputFile)
        {
            ioHelper = new IOHelper(inputFile, outputFile, Encoding.Default);
            Solve();
            ioHelper.Dispose();
        }

        static void Main(string[] args)
        {
            Program myProgram = new Program(null, null);
        }
    }
}


using System;
class Program
{
    static void Main()
    {
        Func<string> r = () => Console.ReadLine();
        string a = r(), s = r();
        Console.WriteLine(s.Contains(a[0]) | s.Contains(a[1]) ? "YES" : "NO");
    }
}


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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            string maincard = Console.ReadLine();
            string othercards = Console.ReadLine();
            bool yes = false;
            for (int i = 0; i < 14; i++)
            {
                if (othercards[i] == 32)
                {

                }
                else if (i % 3 == 0)
                {
                    if (othercards[i] == maincard[0])
                    {
                        Console.WriteLine("YES");
                        yes = true;
                        break;
                    }

                }
                else if ((i % 3)-1 == 0) {
                    if (true)
                    {
                        if (othercards[i] == maincard[1])
                        {
                            Console.WriteLine("YES");
                            yes = true;
                            break;
                        }
                    }

                }
            }

            if (yes == false)
            {
                Console.WriteLine("NO");
            }
            Console.ReadLine();

        }
    }
}


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


class Program
{
    static void Main(string[] args)
    {
        int mins2 = Console.ReadLine();
        string minsList = Console.ReadLine();
        string[] mins = minsList.Split(' ');
        int[] finalMins = new int[mins.Length];
        for(int i = 0;i<= mins.Length - 1;i++)
         finalMins[i] = (int) mins[i];
        if(finalMins[0] > 15)
            Console.WriteLine(15);
        else
        {
            int result = 0;
            for(int j = 0;j<= finalMins.Length - 1;j++)
            {
                    if(result + 15 >= finalMins[j] && result < 90)
                    {
                        result = finalMins[j];
                    }
                    else
                    {
                        result = result + 15;
                        break;
                    }

            }
            result = result > 90 ? 90 : result;
            Console.WriteLine(90);
        }

    }
}


//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5

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

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
		String p=Console.ReadLine();
		String[] digits=p.Split(' ');
		int a=int.Parse( digits[0]) ;
		int b=int.Parse( digits[1]) ;
		if(a > 9 || a<0 || b>9 || b<0 )
		{
		Console.Write(-1);
		}
		else if( a==b)
		{
		Console.WriteLine(digits[0] + '0'+'0');
		Console.WriteLine(digits[1] + '0'+'1');
		}
		else if( b-a==1)
		{
		Console.WriteLine(digits[0] + '9'+'9');
		Console.WriteLine(digits[1] + '0'+'0');
		}
		else if( a==9 && b==1)
		{Console.WriteLine(9));
		Console.WriteLine(10);}
		else
			Console.Write(-1);
        }
    }
}


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

namespace CodeForces
{
    class B
    {
        public long BinSea(long l2, long r2, long k, long n)
        {
            long mid = 0;
            long l = l2;
            long r = r2;

            while (l < r)
            {
                mid = (l + r) / 2;
                if (k * (k - 1) / 2 - (k - mid) * (k - mid - 1) / 2 + 1 < n)
                    l = mid + 1;
                else
                    r = mid;
            }
            return r;
        }

        public void Run()
        {
            long[] nk = (from str in Console.ReadLine().Split(' ', '\t') select long.Parse(str)).ToArray();
            long n = nk[0];
            long k = nk[1];

            Console.WriteLine((k * (k + 1) / 2) - k + 1 < n ? -1 : BinSea(0, k - 1, k, n));
        }
    }

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


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

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

                string[] s = Console.ReadLine().Split(' ');
                Solution1 ss = new Solution1();
                ss.find_power_greater(Convert.ToInt32(s[0]), Convert.ToInt32(s[1]));

}
}

 public class Solution1
    {
         public void find_power_greater(int a, int b)
        {
            double ab = findapowerb(a, b);
            double ba = findapowerb(b, a);
            if (ab == ba)
            {
                Console.WriteLine("=");
            }
            if (ab > ba)
            {
                Console.WriteLine(">");
            }
            if (ab < ba)
            {
                Console.WriteLine("<");
            }
        }
         static int Log2n(int n)
        {
            return (n > 1) ? 1 +
                Log2n(n / 2) : 0;
        }
        public static int findapowerb(int a, int b)
        {

             return  (b) *   (Math.Log(a) );

    }
}
}


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

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

                string[] s = Console.ReadLine().Split(' ');
                Solution1 ss = new Solution1();
                ss.find_power_greater(Convert.ToInt32(s[0]), Convert.ToInt32(s[1]));

}
}

 public class Solution1
    {
         public void find_power_greater(int a, int b)
        {
            double ab = findapowerb(a, b);
            double ba = findapowerb(b, a);
            if (ab == ba)
            {
                Console.WriteLine("=");
            }
            if (ab > ba)
            {
                Console.WriteLine(">");
            }
            if (ab < ba)
            {
                Console.WriteLine("<");
            }
        }

        public static int findapowerb(int a, int b)
        {

             return  (b) *   (Math.Log(a) );

    }
}
}


#include <stdio.h>
#include <algorithm>
using namespace std;
int n,k;
int a[100];
int main()
{
    scanf("%d%d",&n,&k);
    for(int i=0;i<n;i++)
    scanf("%d",a+i);
    sort(a,a+n);
    int s=0;
    int c=0;
    for(int i=0;i<n;i++)
    if(s+a[i]<=k)
    {
        s+=a[i];
        c++;
    }else break;
    printf("%d\n",c);
    for(int i=0;i<c;i++)
    printf("%d ",a[i]);
    printf("\n");
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,a[105];
    cin>>n>>k;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }

    int left = 0, right = 0;
    int i = 0;
    while (i < n && a[i] <= k) {
        left++; i++;
    } i = n - 1;
    while (i > 0 && a[i] <= k) {
        right++; i--;
    }
    cout << min(left + right, n);
}


using System;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int[][] matrix = new int[3][];
            int[] s = new int[3];

            for (int i = 0; i < 3; i++)
            {
                matrix[i] = new int[3];
                s[i] = 0;

                string[] lineParts = Console.ReadLine().Split(' ');

                for (int j = 0; j < 3; j++)
                {
                    matrix[i][j] = int.Parse(lineParts[j]);
                    s[i] += matrix[i][j];
                }
            }

            int max = Math.Max(s[0], Math.Max(s[1], s[2]));

            matrix[0][0] = max - matrix[0][1] - matrix[0][2] + 1;
            matrix[1][1] = max - matrix[1][0] - matrix[1][2] + 1;
            matrix[2][2] = max - matrix[2][0] - matrix[2][1] + 1;

            for (int i = 0; i < 3; i++)
            {
                Console.WriteLine(String.Join(" ", matrix[i]));
            }
        }
    }
}


Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "codeforces 124 d2 qA", "codeforces 124 d2 qA\codeforces 124 d2 qA.csproj", "{B5C5AB1F-F537-4305-AD88-591CBFC08780}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B5C5AB1F-F537-4305-AD88-591CBFC08780}.Debug|x86.ActiveCfg = Debug|x86
		{B5C5AB1F-F537-4305-AD88-591CBFC08780}.Debug|x86.Build.0 = Debug|x86
		{B5C5AB1F-F537-4305-AD88-591CBFC08780}.Release|x86.ActiveCfg = Release|x86
		{B5C5AB1F-F537-4305-AD88-591CBFC08780}.Release|x86.Build.0 = Release|x86
	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 ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var from = Console.ReadLine().ToCharArray();
            var to = Console.ReadLine().ToCharArray();
            var clonef = ((char[])from.Clone()).ToList();

            if (from.Length == to.Length && to.All(p=>{
                var contains = clonef.Contains(p);
                clonef.Remove(p);
                return contains;
            }))//array
            {
                Console.WriteLine("array");
            }
            else
            {
                if (to.All(p =>
                {
                    var contains = clonef.Contains(p);
                    clonef.Remove(p);
                    return contains;
                }))
                {
                    var i = 0;
                    var j = 0;
                    clonef = from.Clone();
                    while (i < to.Length && j < clonef.Count)
                    {
                        if (clonef[j] == to[i])
                        {
                            i++;
                            clonef.RemoveAt(j);

                        }
                        else
                        {
                            j++;
                        }
                    }

                    if (i == to.Length)
                    {
                        Console.WriteLine("automaton");
                    }
                    else
                    {

                        Console.WriteLine("both");
                    }
                }
                else
                {
                    Console.WriteLine("need tree");
                }
            }
        }
    }
}


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

namespace Codeforces.R342.C
{
    public static class Solver
    {
        public static void Main()
        {
            using (var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false })
            {
                Solve(Console.In, sw);
            }
        }

        public static void Solve(TextReader tr, TextWriter tw)
        {
            WriteAnswer(tw, Parse(tr));
        }

        private static void WriteAnswer(TextWriter tw, long answer)
        {
            tw.WriteLine(answer);
        }

        private static long Parse(TextReader tr)
        {
            var a = tr.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
            return Calc(a[0], a[1]);
        }

        private static long Calc(long r, long h)
        {
            var n = h / r * 2;

            var s = h % r;

            if (s * 2 < r)
                ++n;
            else if (s * 2 >= r)
                n += 2;
            else if (s * 2 * 2 * s >= r * r * 3)
                n += 3;

            return n;
        }
    }
}


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

namespace ConsoleApp21
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = Convert.ToInt32(Console.ReadLine());
            int l = Convert.ToInt32(Console.ReadLine());
            int pow = k;
            int count = 0;

            if (l != a && l % a == 0)
            {
                do
                {
                    l /= a;
                    if (l % a == 0)

                        count++;

                    else
                    {
                        count = 0;
                        break;
                    }

                }
                while (l > a);

                    if (count > 0)
                    {
                        Console.WriteLine("YES");
                        Console.WriteLine(count);
                    }
                    else Console.WriteLine("NO");

            }

            else if (l == a)
            {
                Console.WriteLine("YES");
                Console.WriteLine(count);
            }
            else Console.WriteLine("NO");
            Console.ReadKey();

            }

        }
    }


string s = Console.ReadLine();
            string[] array = s.Split(' ');
            int[] numbers = new int[3];
            for (int i = 0; i < array.Length; i++)
                numbers[i] = int.Parse(array[i]);
            bool flag = false;

            for (int i = 0; i < (int) (numbers[2]/numbers[0]); i++)
            {
                for (int j = 0; j < (int) (numbers[2]/numbers[0]); j++)
                {
                    if (numbers[0]*i + numbers[1]*j == numbers[2])
                    {
                        flag = true;
                        break;
                    }
                }
            }
            Console.WriteLine(flag ? "Yes" : "No");


using System;

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            var maxVolume = 0;
            var charCount = Console.ReadLine();
            var sentance = Console.ReadLine();
            var words = sentance.Split(' ');

            foreach (var word in words)
            {
                var capsCount = word.Where(c => c.ToString() == c.ToString().ToUpper()).Count();

                if (capsCount > maxVolume)
                {
                    maxVolume = capsCount;
                }
            }
            Console.WriteLine(maxVolume);
        }
    }
}


namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(long.MaxValue);
            var a = Console.ReadLine().Split(' ');
            long n = long.Parse(a[0]);
            long k = long.Parse(a[1]);
            var b = Number(n, k);
            Console.WriteLine(b);
            Console.ReadKey();
        }
        public static long Number(long n, long k)
        {
            if (k <= (n + 1) / 2)
            {
                return k * 2 - 1;
            }
            else
            {
                return (k - (n + 1) / 2) * 2;
            }
        }
    }
}


using System;
class Sample
{
    public static void Main()
    {
        String[] ip=Console.ReadLine().Split(' ');
        long n=Long.Parse(ip[0]);
        long k=Long.Parse(ip[1]);
        long limit=(n+1)/2;
        if(k<=limit)
        {
        Console.WriteLine(2 * k - 1);
        }
        else
        {
            Console.WriteLine(2 * (k-limit));

        }

    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logic_Gates", "Logic_Gates\Logic_Gates.csproj", "{193BA58A-1139-442C-9195-521827C9894B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{193BA58A-1139-442C-9195-521827C9894B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{193BA58A-1139-442C-9195-521827C9894B}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{193BA58A-1139-442C-9195-521827C9894B}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{193BA58A-1139-442C-9195-521827C9894B}.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;

namespace codeforces318A
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Int32> nk = Console.ReadLine().Split(" ").Select(x => Int32.Parse(x)).ToList();
            List<Int32> odd_list = new List<Int32>();
            List<Int32> even_list = new List<Int32>();
            for (Int32 i = 1; i < nk[0]; i++)
            {
                if(i%2 == 0)
                {
                    even_list.Add(i);
                }
                else
                {
                    odd_list.Add(i);
                }
            }
            odd_list.AddRange(even_list);
            Console.WriteLine(odd_list[nk[1]-1]);
        }
    }
}


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

namespace Fun
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            var n = long.Parse(input[0]);
            var k = long.Parse(input[1]);
            if (k <= (n + 1) >> 1)
                Console.WriteLine(k * 2 - 1);
            else
                Console.WriteLine((k - ((n + 1) >> 1)) * 2);
        }
    }
}


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

class Program
{
	private static void SolveC()
    {
        var n = RI();
        //var m = RIA(n);
        long ans = 0;
        for (int i = 0; i < n; i++)
        {

        }

        Console.WriteLine(ans);
    }

    private static void SolveB()
    {
        Console.ReadLine();
        var s = Console.ReadLine();
        int count = 0;
        int mAX = 0;

        while (s.Contains('('))
        {
            int p1 = s.IndexOf('(');
            int p2 = s.IndexOf(')');

            string ss = s.Substring(p1 + 1, p2 - p1 - 1);
            count += (ss.Split('_').Where(qwe => qwe.Length > 0).Count());

            s = s.Remove(p1, p2 - p1 + 1).Insert(p1, "_");
        }

        var words = s.Split('_').Where(qwe => qwe.Length > 0).ToArray();
        if (words.Length > 0)
            mAX = words.Max(ww => ww.Length);

        Console.WriteLine(mAX + " " + count);
    }
	static void Main(string[] args)
    {

        SolveB();
        //SolveC();
    }

}


double c1 = convert.todouble(Console.ReadLine());


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int l = s.Length;
            int res = 0;
            int c1 = 0, c2 = 0;
            c1 = Math.Abs('z'-s[0])+1;
            c2 = Math.Abs('a'-s[0]);
            if (c1 < c2)
                res += c1;
            else
                res += c2;
            for (int i = 1; i < l;i++ )
            {
                c1 = Math.Abs(s[i-1]-s[i]);
                c2 = Math.Abs('z' - Math.Max(s[i - 1], s[i])) + Math.Abs('a' - Math.Min(s[i - 1], s[i])) + 1;
                if (c1 < c2)
                    res += c1;
                else
                    res += c2;
            }
                Console.WriteLine(res);
        }
    }
}


class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int Sum = 0;
            char p = 'a';
            int CS, AS;
            for (int i = 0; i < input.Length; i++)
            {
                if (p <= input[i])
                {
                    AS = 'z' - input[i] + 1 + p - 'a';
                    CS = input[i] - p;
                }
                else
                {
                    AS = 'z' - p + 1 + input[i] - 'a';
                    CS = p - input[i];
                }
                if (AS > CS) Sum += CS; else Sum += AS;
                p = input[i];
            }
            Console.WriteLine(Sum);
            Console.ReadKey();
        }
    }


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Solution{
	 static void Main(string[] args) {
           cconst int MOD = 1000000007;
            int n = int.Parse(Console.ReadLine());
            int[] a = Array.ConvertAll(Console.ReadLine().Split(' '), x => Convert.ToInt32(x));
            C = new long[200, 200];
            C[0, 0] = 1;
            for (int i = 1; i < 200; i++) {
                C[i, 0] = C[i, i] = 1;
                for (int j = 1; j <= i; j++)
                    C[i, j] = (C[i - 1, j] + C[i - 1, j - 1]) % MOD;
            }

            long ans = 0;
            for (int k = a.Sum(); k <= n; k++) {

                long[,] dp = new long[110, 30];
                dp[k, 0] = 1;

                for (int j = 0; j < 10; j++)
                    for (int i = a[j]; i <= k; i++)
                        for (int l = a[j]; l <= i; l++) {
                            if (j == 0) dp[i - l, j + 1] = (dp[i - l, j + 1] + dp[i, j] * CNK(i - 1, l) % MOD) % MOD;
                            else dp[i - l, j + 1] = (dp[i - l, j + 1] + dp[i, j] * CNK(i, l) % MOD) % MOD;
                        }

                ans += dp[0, 10];
                ans %= MOD;
            }

            Console.WriteLine(ans);
	 }
     static long[,] C;
        static long CNK(long n, long k) {
            if (k > n || k < 0) return 0;
            if (k == n || k == 0) return 1;
            return C[n, k];
        }
}


using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main()
        {
            var data = Console.ReadLine();
            var maxValueOfElement = double.Parse(data.Split(" ")[0]);
            var desiredSum = double.Parse(data.Split(" ")[1]);
            var result = Math.Ceiling(desiredSum / maxValueOfElement);
            Console.WriteLine(result);
        }
    }
}


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

namespace Problems
{
    class Program
    {
        public static void main(string[] args)
        {
            int N;
            String[] Row={"","Sheldon","Leonard","Penny","Rajesh","Howard"};
            N=Console.Read();
            N = N - 48;
            while (N>5)
            {
                N = N / 2;
                N = N - 2;
            }
            Console.Write(Row[N]);

        }
    }
}


using System;
 class soublecola
 {
     static void Main()
     {
         double n = double.Parse(Console.ReadLine());
         double i = 0.0;
          double j = 0.0;
          double sum = 0.0;
          while ( n > 0 )
          {
              sum = 5*Math.Pow(2,j);
	      i = Math.Pow(2,j);
	      j++;
              if ( sum > n)
              {
                  break;
              }
              else
                  n -= sum;
          }

          if ( n/i > 0 && n/i <= 1 )
              Console.WriteLine("Sheldon");
          else if ( n/i > 1 && n/i <= 2)
              Console.WriteLine("Leonard");
          else if ( n/i > 2 && n/i <= 3)
              Console.WriteLine("Penny");
          else if ( n/i > 3 && n/i <= 4)
              Console.WriteLine("Rajesh");
          else if ( n/i > 4 && n/i <= 5)
              Console.WriteLine("Howard");
	  }

      }
  }


    class main
    {
        public static void main()
        {
            int N;
            String[] Row={"","Sheldon","Leonard","Penny","Rajesh","Howard"};
            while (N>5)
            {
                N = N / 2;
                N = N - 2;
            }
            Console.Write(Row[N]);

        }
    }
}


using System.Linq;

public static class Program {
  public static void Main() {
    var n = long.Parse(Console.ReadLine()) - 1;
    var curSize = 5L;
    var curOffset = 0L;

    while (n >= curSize) {
      n -= curSize;
      curSize *= 2;
    }

    curSize = curSize / 5;
    var arr = new [] {"Sheldon", "Leonard", "Penny", "Rajesh", "Howard"};
    Console.WriteLine(arr[n / curSize]);
  }
}


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

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

            string[] friends = { "Sheldon", "Leonard", "Penny", "Rajesh","Howard" };
            int num = Convert.ToInt32(Console.ReadLine());
            int beflen = friends.Length;
                if (num > friends.Length)
                {
                    Array.Resize(ref friends, num);

                    for (int i = 0; i < num; i++)
                    {
                        string tmp = friends[0];
                        for (int j = 0; j < friends.Length - 1; j++)
                        {
                            friends[j] = friends[j + 1];
                        }
                        if (beflen != num)
                            beflen++;
                        friends[beflen - 1] = tmp;
                        friends[beflen - 2] = tmp;

                    }
                    Console.WriteLine(friends[friends.Length - 1]);
                }
                else
                    Console.WriteLine(friends[num - 1]);
            }
    }
}


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

namespace Problems
{
    class main
    {
        public static void main()
        {
            int N;
            String[] Row={"","Sheldon","Leonard","Penny","Rajesh","Howard"};
            while (N>5)
            {
                N = N / 2;
                N = N - 2;
            }
            Console.Write(Row[N]);

        }
    }
}


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

namespace DoubleCola
{
    class Program
    {
        static void Main(string[] args)
        {
          Int64 input = Convert.ToInt64(Console.ReadLine());
          string[] people = new string[5] { "Sheldon", "Leonard", "Penny", "Rajesh", "Howard" };
          while(input > 5){
            input = (n-4)/2;
          }
          Console.WriteLine(people[input - 1]);
        }
    }
}


#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
bool IsPrime(int num)
{
    if (num==2)
        return  true;
    if (num<2 || num%2==0)
        return false;

    int limit=sqrt(num);
    for (int i=3; i<=limit; i+=2)
        if (num%i==0)
            return false;

    return true;

}
int main()
{
    int n,k;
    cin>>n>>k;
    vector<int>primes;
    for (int i=2; i<=n; i++)
        if(IsPrime(i))
            primes.push_back(i);

    int counter=0;
    for (int i=0; i<primes.size()-1; i++)
    {
        int temp=primes[i]+primes[i+1]+1;
        if(IsPrime(temp) && temp<=n)
            counter++;
        if(temp>n ||counter>k)
            break;
    }

    if(counter>=k)
        cout<<"YES";
    else
        cout<<"NO";

    return 0;
}


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

namespace ConsoleApplication3
{
    class Program
    {
        public void Run(TextReader tr, TextWriter tw)
        {
            int n = int.Parse(tr.ReadLine());
            string bilet = tr.ReadLine();
            int[] left = new int[n];
            int[] right = new int[n];
            for(int i = 0; i < n; i++)
            {
                left[i] = (int)(bilet[i] - '0');
                right[i] = (int)(bilet[i + n] - '0');
            }
            Array.Sort(left);
            Array.Sort(right);
            bool ls = true;
            bool gr = true;
            for (int i = 0; i < n; i++)
            {
                if (left[i]<=right[i])
                {
                    gr = false;
                }
                if (left[i] >= right[i])
                {
                    ls = false;
                }
            }
            tw.WriteLine(((ls || gr)?"YES":"NO"));
        }

        static void Main(string[] args)
        {
            new Program().Run(new StreamReader(Console.In, Console.Out));
        }
    }
}


using Systetm;
using System.Linq;

class Program
{
public static string GetAnswer(int[] digits1, int[] digits2)
{
    Array.Sort(digits1);
    Array.Sort(digits2);

    var comp = digits1[0].CompareTo(digits2[0]);
    if(comp == 0)
        return "NO"
    for(int i = 1; i < digits1.Length; i++) {
        var c = digits1[i].CompareTo(digits2[i]) * comp;
        if(c <= 0) {
            return "NO";
        }
    }

    return "YES";
}

public static void Main()
{
    var n = int.Parse(Console.ReadLine());
    var s = Console.ReadLine();
    var digits1 = s.Substring(0,n).ToCharArray().Select((c) => int.Parse(c.ToString())).ToArray();
    var digits2 = s.Substring(n,n).ToCharArray().Select((c) => int.Parse(c.ToString())).ToArray();

    Console.WriteLine(GetAnswer(digits1, digits2));
}
}


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

            byte[] A1 = new byte[25];
            byte[] A2 = new byte[25];
            byte[] A3 = new byte[25];
            bool f=true;
            string s = Console.ReadLine();
            for (int i = 0; i < s.Length; i++)
            {
                int n = (int)s[i] - (int)'A';
                A1[Convert.ToByte(n)]++;
            }
            s = Console.ReadLine();
            for (int i = 0; i < s.Length; i++)
            {
                int n = (int)s[i] - (int)'A';
                A2[Convert.ToByte(n)]++;
            }
            s = Console.ReadLine();
            for (int i = 0; i < s.Length; i++)
            {
                int n = (int)s[i] - (int)'A';
                A3[Convert.ToByte(n)]++;
            }
            for (int i = 0; i < 25; i++)
            {
                if (A1[i] + A2[i] != A3[i])
                {
                    Console.WriteLine("NO");
                    f=false;
                    break;
                }
            }
            if (f)
                Console.WriteLine("YES");
            Console.ReadLine();
            }
        }

    }


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

namespace HappyThing
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s0 = Console.ReadLine();
            string s1 = s + s0;
            string s2 = Console.ReadLine();
            bool ok = String.Join("", s1.OrderBy(o => o).ToArray()).Equals(String.Join("", s2.OrderBy(o => o).ToArray()), StringComparison.OrdinalIgnoreCase);
            if (ok == true)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


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

namespace Contest364A
{
	class Program
	{
		static List<short> deletedNums;
        static void Main(string[] args)
		{
			short count = short.Parse(Console.ReadLine());
			var nums = Console.ReadLine().Split(' ').Select(z => short.Parse(z)).ToList();
			var sum = (short)(Sum(nums,count) / (count / 2));
			deletedNums = new List<short>(count);
			for (short i = 0; i < count / 2; i++)
				n(nums, sum, count);
		}
		static void n(List<short> nums, short sum ,short count)
		{
			short firstindex= 0;
			for (short i = 0; i <count; i++)
			{
				if (!deletedNums.Any(x=>x==i))
				{
					firstindex = i;
					break;
				}
			}
			var first = nums[firstindex];
			deletedNums.Add((short)firstindex);
			int secondindex = 0;
			for (short i = firstindex; i < count; i++)
			{
				if (nums[i]+first==sum & (!deletedNums.Any(x => x == i)))
				{
					secondindex = i;
					break;
				}
			}
			deletedNums.Add((short)secondindex);

			Console.WriteLine($"{firstindex + 1} {secondindex + 1}");
		}
		public static short Sum(List<short> o, short count)
		{
			short i = 0;
			for (int u = 0; u < count; u++)
			{
				i += o[u];
			}
			return i;
		}
	}
	public static class M
	{
		public static short Sum(this List<short> o, short count)
		{
			short i = 0;
			for (int u = 0; u < count; u++)
			{
				i += o[u];
			}
			return i;
		}

	}
}


using System;
    class Main
    {
        static void Main()
        {
            int hojas;
            int[] diasSemana = new int[7];
        hojas = int.Parse(Console.ReadLine());
        for(int i =0; i<7; i++)
            diasSemana[i] = int.Parse(Console.ReadLine());
        int dia=0;
        while(hojas>0)
        {
            hojas-=diasSemana[dia];
                if(hojas<=0)
                {
                       Console.WriteLine(dia+1);
                       break;
                }
            if(dia==6 )
            {
                dia=0;
                continue;
            }
            dia++;
        }
    }
}


using System;

class P {
  static void Main(){
    var map = new int[1000];
    map[(int)'>'] = 8;
    map[(int)'<'] = 9;
    map[(int)'+'] = 10;
    map[(int)'-'] = 11;
    map[(int)'.'] = 12;
    map[(int)','] = 13;
    map[(int)'['] = 14;
    map[(int)']'] = 15;

    var res = 0;
    foreach (var c in Console.ReadLine())
      res = (res * 16 + map[(int)c]) % 1000003);
    Console.Write(res);
  }
}


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

namespace checkForSplit
{
    class Program
    {

        static void Main(string[] args)
        {
            string str1 = Console.ReadLine();
            string str2 = Console.ReadLine();
            for (int i = 0; i < str1.Length; i++)
            {
                if (str1[i] == str2[i]) Console.Write(0);
                else Console.Write(1);

            }

        }
        Console.WriteLine();

    }

}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
string a=Console.ReadLine();
string b=Console.ReadLine();
string c=a;
for(i=0;i<a.Length;i++)
{
if(a[i].ToString()==b[i].ToString())
{c[i]="0";}
else
{c[i]="1";}
}

Console.Write(c);
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
             string a=Console.ReadLine();
             string b=Console.ReadLine();
             string c=a;
             for(int i=0 ; i < a.Length ; i++)
                 {
                       if( a[i].ToString() == b[i].ToString() )
                        { c[i].ToString() = "0" ;}
                      else
                        { c[i].ToString() = "1" ;}
                }
              Console.Write(c);
        }
    }
}


using System;
using System.Linq;

Class Ultra
{
    public void static Main(string [] Args)
    {
        List<int> pair1=Console.ReadLine().Split(' ').ToList.ConvertAll(s=>Convert.ToInt32(s));
        List<int> pair2=Console.ReadLine().Split(' ').ToList.ConvertAll(s=>Convert.ToInt32(s));

        for(int i=0;i<pair1.Count;i++)
        {
            if(pair1[i]==pair2[i])
            {
                Console.Write("0"+" ");
            }
            else
            {
                Console.Write("1"+" ");
            }
        }
    }

}


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

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

             int n=int.Parse(Console.ReadLine());
             string s=Console.ReadLine();
             int x=0;
             int z=0;
             int o=0;
             for(int i=0;i<n;i++)
             {
             if(s[i]=='0')
             z++;
             else
             o++
             }
             if(z==o)
             {
             for(int i=0;i<n;i++)
             {
                  //bool f=false;
                  int zero=0;
                  int one=0;
                  for(int j=0;j<i;j++)
                  {
                       if(s[i]=='0')
                       zero++;
                       else
                       one++;

                  }
                  if(zero!=one)
                  {
                       zero=0;
                       one=0;
                       for(int j=i;j<n;j++)
                  {
                       if(s[i]=='0')
                       zero++;
                       else
                       one++;

                  }
                  }
                  if(zero!=one)
                  {
                       x=i;
                       break;
                  }

             }
             if(x>0)
             {
                  Console.WriteLine(2);
             for(int i=0;i<x;i++)
             Console.Write(s[i]);
             Console.Write(" ");
             for(int i=x;i<n;i++)
             Console.Write(s[i]);
             }
             else
             {
                  Console.WriteLine(1);

             Console.WriteLine(s);
             }
             }
             else
             {
                  Console.WriteLine(1);
                  Console.WriteLine(s);
             }
        }
    }
}


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

using System.Text.RegularExpressions;

class Program
{
    static public int[] readIntArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToInt32(s)).ToArray();
    }
    static public long[] readLongArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToInt64(s)).ToArray();
    }
    static public ulong[] readULongArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToUInt64(s)).ToArray();
    }
    public static int readInt()
    {
        return Convert.ToInt32(Console.ReadLine());
    }

    static void Main(string[] args)
    {

        RountineProblem();
    }
    static void RountineProblem()
    {
        int[] arr = readIntArray();
        int bc = arr[1] * arr[2];
        int ad = arr[0] * arr[3];
        int up = 0;
        int down = 0;
        if (bc > ad)
        {
            up = bc - ad;
            down = bc;
        }
        else
        {
            up = ad - bc;
            down = ad;
        }
        for(int i = 2; i <= down; i++)
        {
            if(up%i==0 && down % i == 0)
            {
                up /= i;
                down /= i;
            }
        }
        if (up == 0) { down = 1; }
        Console.WriteLine("{0}/{1}",up,down);
    }


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

using System.Text.RegularExpressions;

class Program
{
    static public int[] readIntArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToInt32(s)).ToArray();
    }
    static public long[] readLongArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToInt64(s)).ToArray();
    }
    static public ulong[] readULongArray()
    {
        return (from string s in Console.ReadLine().Split(' ') select Convert.ToUInt64(s)).ToArray();
    }
    public static int readInt()
    {
        return Convert.ToInt32(Console.ReadLine());
    }

    static void Main(string[] args)
    {

        RountineProblem();
    }
    static void RountineProblem()
    {
        int[] arr = readIntArray();
        int bc = arr[1] * arr[2];
        int ad = arr[0] * arr[3];
        int up = 0;
        int down = 0;
        if (bc > ad)
        {
            up = bc - ad;
            down = bc;
        }
        else
        {
            up = ad - bc;
            down = ad;
        }
        for(int i = 2; i <= down; i++)
        {
            if(up%i==0 && down % i == 0)
            {
                up /= i;
                down /= i;
            }
        }
        if (up == 0) { down = 1; }
        Console.WriteLine("{0}/{1}",up,down);

    }

}


using System;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(" ", StringSplitOptions.None);
            int numPeople = Convert.ToInt32(input[0]);
            int airplanesPerPerson = Convert.ToInt32(input[1]);
            int airplanesFromSheet = Convert.ToInt32(input[2]);
            int sheetsInPack = Convert.ToInt32(input[3]);

            int sheets;
            if(airplanesPerPerson % airplanesFromSheet == 0)
            {
                sheets = airplanesPerPerson / airplanesFromSheet;
            }
            else
            {
                sheets = airplanesPerPerson / airplanesFromSheet + 1;
            }

            sheets *= numPeople;

            if (sheets % sheetsInPack == 0)
            {
                Console.WriteLine(sheets / sheetsInPack);
            }
            else
            {
                Console.WriteLine(sheets / sheetsInPack + 1);
            }
        }
    }
}


// A Dynamic Programming based
// C# program to find minimum
// number operations to
// convert str1 to str2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Lap
{
    public int P;
    public int Q;

}
class GFG
{
    static string[] memo = new string[13];

    public static void Main()
    {
        ///var t = int.Parse(Console.ReadLine());

        ////while (t > 0)
        //{
        //    // t--;
        var n = int.Parse(Console.ReadLine());
        //    //var arr = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
        //var input = Console.ReadLine().Split();
        //var n = int.Parse(input[0]);
        //var m = int.Parse(input[1]);
        //    //var k = int.Parse(input[2]);
        //
        //var input = Console.ReadLine().Split(' ');
        //var n = int.Parse(input[0]);
        //var a = int.Parse(input[1]);
        //var b = int.Parse(input[2]);
        //var c = int.Parse(input[3]);

        List<int> x = new List<int>();
        List<int> y = new List<int>();
        for (int i = 0; i < n; i++)
        {
            var arr = Console.ReadLine().Split(' ').Select(xx => int.Parse(xx)).ToArray();
            x.Add(arr[0]);
            y.Add(arr[1]);
        }
        int sumx = x.Sum();
        int sumy = y.Sum();

        if (sumx % 2 == 0 && sumy % 2 == 0)
        {
            Console.Write("0");
            return;
        }

        if (x.Count == 1 && y.Count == 1)
        {
            Console.Write("-1");
            return;
        }

        if (sumx % 2 != 0 && sumy % 2 == 0)
        {
            for (int i = 0; i < n; i++)
            {
                //if (Math.Abs(x[i] - y[i]) % 2 == 0 && (x[i] % 2 == 0 || y[i] % 2 == 0))
                //{
                //    Console.Write("1");
                //    return;
                //}
                //else
                //{
                Console.Write("-1");
                return;
                //}
            }
        }
        if (sumx % 2 == 0 && sumy % 2 != 0)
        {
            for (int i = 0; i < n; i++)
            {
                //if (Math.Abs(x[i] - y[i]) % 2 == 0&&(x[i]%2==0||y[i]%2==0))
                //{
                //    Console.Write("1");
                //    return;
                //}
                //else
                {
                    Console.Write("-1");
                    return;
                    //}
                }
            }

            if (sumx % 2 != 0 && sumy % 2 != 0)
            {
                for (int i = 0; i < n; i++)
                {
                    if (Math.Abs(x[i] + y[i]) % 2 != 0)
                    {

                        Console.Write("1");
                        return;

                    }
                    else
                    {
                        Console.Write("-1");
                        return;
                    }
                }
            }

        }

    }


// ac 1970 мс

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

namespace sar_cs
{
    static class Helpers
    {
        // Mono lacks this override of string.Join()
        public static string Join<T>(this IEnumerable<T> objs, string sep)
        {
            var sb = new StringBuilder();
            foreach (var s in objs) { if (sb.Length != 0) sb.Append(sep); sb.Append(s); }
            return sb.ToString();
        }

        public static string AsString(this double a, int digits)
        {
            return a.ToString("F" + digits, CultureInfo.InvariantCulture);
        }

        public static Stopwatch SW = Stopwatch.StartNew();
    }

    public class Program
    {
        #region Helpers

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

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

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

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

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

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

            public long ReadLong()
            {
                long res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = 1;
                    c = Read();
                }
                int len = 0;

                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    if ((uint)(c -= 48) >= 10) throw new FormatException();
                    len++;
                    res = checked(res * 10 - c);
                    c = Read();
                }
                if (len == 0) throw new FormatException();
                Back();
                return checked(res * sign);
            }

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

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

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

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

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

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

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

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

            public int[] ReadIntArr(int n)
            {
                var a = new int[n]; for (int i = 0; i < n; i++) a[i] = ReadInt(); return a;
            }

            public long[] ReadLongArr(int n)
            {
                var a = new long[n]; for (int i = 0; i < n; i++) a[i] = ReadLong(); return a;
            }
        }

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

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

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

        #endregion Helpers

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

        static IEnumerable<int> W(int p)
        {
            int b = MyStructs.BitTools.HighBit(p);
            for (int i = 0; i < b + 1; i++)
            {
                yield return p;
                p = p / 2 + ((p & 1) << b);
            }

        }

        static void Main(string[] args)
        {
            //sar_cs_structs.FenwickTree.Test(); return;
            //Console.SetIn(File.OpenText("_input"));
            var parser = new Parser();
            while (!parser.SeekEOF)
            {
                long n = parser.ReadInt();
                long x = parser.ReadInt();
                long minp = parser.ReadInt();

                long res = 0;
                while (100 * (x + res) < n * minp)
                    res++;

                Console.WriteLine(res);
            }
        }
    }
}


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

namespace CodeForces
{
    class CutRibbonBottomUp
    {
        public static void Main()
        {
            var input = Console.ReadLine().Split(' ');
            var nums = new List<int>();
            var n = int.Parse(input[0]);
            nums.Add(int.Parse(input[1]));
            nums.Add(int.Parse(input[2]));
            nums.Add(int.Parse(input[3]));

            nums.Sort();

            Console.WriteLine(recurse(n, 0, 0, nums));
        }

        public static int recurse(int r, int l, int s, List<int> nums)
        {
            int max = 0;

            for (int i = 0; i < 3; ++i)
            {
                if (l + nums[i] < r)
                {
                    max = Math.Max(max, recurse(r, l + nums[i], s + 1, nums));
                }

                if (l + nums[
                    return  Math.Max(max, s + 1);
                }
            }

            return max;
        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n, s;
            int tempsum;

            int diff;
            int[] marks = new int[n];
            int i;
            for (i = 0; i < n; i++)
                marks[i] = 2;
            int cnt;

            while (true)
            {
                tempsum = marks.Sum();
                diff = s - tempsum;
                if (diff == 0)
                    break;

                if (diff > n)
                    cnt = n;
                else
                    cnt = diff;
                for (i = 0; i < diff; i++)
                    marks[i] += 1;
            }

            cnt = marks.Where(item => item == 2).Count();
            System.Console.WriteLine(cnt.ToString());
            System.Console.ReadKey();

        }
    }
}


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

namespace Sharp
{

    class Program {
        private static Reader cin;
        private static TextWriter cout;
        private static long MOD = 998244353;

        static long solve(int a, int b) {
            var f = new long[b + 1];
            f[b] = 1;
            for (int i = 0; i < a; ++i) {
                for (int j = 0; j < b; ++j) {
                    f[j] = (f[j] + f[j + 1] * (j + 1)) % MOD;
                }
            }

            long ans = 0;
            for (int i = 0; i <= b; ++i) {
                ans = (ans + f[i]) % MOD;
            }

            return ans;
        }
        static void Main(string[] args) {
            cin = new Reader(Console.In);
            cout = Console.Out;
            cin.Read(out int a).Read(out int b).Read(out int c);
            long ans = 1;
            ans = (ans * solve(a, b)) % MOD;
            ans = (ans * solve(a, c)) % MOD;
            ans = (ans * solve(c, b)) % MOD;
            cout.WriteLine(ans);

        }
    }

    class Reader
    {
        TextReader TextRdr;

        String[] Buffer;
        int Id;
        public Reader(TextReader reader) {
            TextRdr = reader;
            Id = 0;
        }

        public String ReadLine() {
            return TextRdr.ReadLine();
        }

        public String Next() {
            if ((Buffer == null) || (Id == Buffer.Length)) {
                Buffer = ReadLine().Split();
                Id = 0;
            }
            return Buffer[Id++];
        }

        public Reader Read<T>(out T what) {
            what = (T)Convert.ChangeType(Next(), typeof(T));
            return this;
        }

        public T Read<T>() {
            return (T)Convert.ChangeType(Next(), typeof(T));
        }

    }

    class Pair<T1, T2>
    {
        public Pair() {
        }

        public Pair(T1 first, T2 second) {
            this.First = first;
            this.Second = second;
        }

        public T1 First { get; set; }
        public T2 Second { get; set; }
    };

}


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

namespace Problem
{
    class Program
    {
        static void Main(string[] args)
        {
          Console.ReadLine ();
		List<long> nums = Console.ReadLine ().Split (' ').Select (long.Parse).Distinct ().ToList ();
		int result = 0;
		while (nums.Count > 0) {
			long min = nums.Min ();
			nums = nums.Where (n => n % min != 0).ToList ();
			result++;
		}

		Console.WriteLine (result);
        }
    }


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

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

            string s = Console.ReadLine();
            int n = int.Parse(s.Split(' ')[0]);
            int m = int.Parse(s.Split(' ')[1]);

            if (n == 0 and m!=0 )
            {
                Console.WriteLine("Impossible");
            }
            else
            {
                int mx = 0;
                if (m == 0) { mx = n; } else { mx = n + m - 1; }
                if (m >= n)
                {
                    Console.WriteLine(m.ToString()+" "+(mx).ToString());
                }
                else
                {
                    Console.WriteLine(n.ToString() + " " + (mx).ToString());
                }
            }
        }
    }
}


Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "A\A.csproj", "{374333D1-195C-49F9-A930-F802B256D179}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "B\B.csproj", "{19BDB93A-0B05-4481-B346-21EEEE73B927}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C", "C\C.csproj", "{462379A4-75FB-4BD4-AD71-6D009C9127E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D", "D\D.csproj", "{15516AF3-0BB0-479B-8688-80F7AC58ACCC}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{374333D1-195C-49F9-A930-F802B256D179}.Debug|x86.ActiveCfg = Debug|x86
		{374333D1-195C-49F9-A930-F802B256D179}.Debug|x86.Build.0 = Debug|x86
		{374333D1-195C-49F9-A930-F802B256D179}.Release|x86.ActiveCfg = Release|x86
		{374333D1-195C-49F9-A930-F802B256D179}.Release|x86.Build.0 = Release|x86
		{19BDB93A-0B05-4481-B346-21EEEE73B927}.Debug|x86.ActiveCfg = Debug|x86
		{19BDB93A-0B05-4481-B346-21EEEE73B927}.Debug|x86.Build.0 = Debug|x86
		{19BDB93A-0B05-4481-B346-21EEEE73B927}.Release|x86.ActiveCfg = Release|x86
		{19BDB93A-0B05-4481-B346-21EEEE73B927}.Release|x86.Build.0 = Release|x86
		{462379A4-75FB-4BD4-AD71-6D009C9127E0}.Debug|x86.ActiveCfg = Debug|x86
		{462379A4-75FB-4BD4-AD71-6D009C9127E0}.Debug|x86.Build.0 = Debug|x86
		{462379A4-75FB-4BD4-AD71-6D009C9127E0}.Release|x86.ActiveCfg = Release|x86
		{462379A4-75FB-4BD4-AD71-6D009C9127E0}.Release|x86.Build.0 = Release|x86
		{15516AF3-0BB0-479B-8688-80F7AC58ACCC}.Debug|x86.ActiveCfg = Debug|x86
		{15516AF3-0BB0-479B-8688-80F7AC58ACCC}.Debug|x86.Build.0 = Debug|x86
		{15516AF3-0BB0-479B-8688-80F7AC58ACCC}.Release|x86.ActiveCfg = Release|x86
		{15516AF3-0BB0-479B-8688-80F7AC58ACCC}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


using System;
using System.Linq;
using Helpers;

namespace Solution
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            //A435();

            var input = new InputPair<string>(Console.ReadLine());
            var b435 = new B435(input);
            Console.WriteLine(b435.Process());

            Console.ReadLine();
            Console.ReadLine();
        }

        private static void A435()
        {
            var firstRow = new InputPair<int>(Console.ReadLine());
            var secdRow = new InputList<int>(Console.ReadLine());

            int n = firstRow.Pair.Item1;
            int m = firstRow.Pair.Item2;

            int busNumber = 0;

            for (int i = 0; i < n; i++)
            {
                int total = secdRow.Items.ElementAt(i);

                int j = i;
                while (total < m)
                {
                    j++;
                    total += secdRow.Items.ElementAt(j);
                    if (total <= m)
                    {
                        i++;
                    }
                }
                busNumber += 1;
            }

            Console.WriteLine(busNumber);

            Console.ReadLine();
            Console.ReadLine();
        }
    }
  public class InputPair<T>
    {
        private readonly string _line;
        public Tuple<T, T> Pair;

        public InputPair(string line)
        {
            _line = line;
            //Items = new Tuple<T, T>(null,null);
            Process();
        }

        private void Process()
        {
            if (string.IsNullOrWhiteSpace(_line)) return;

            string[] items = _line.Split();
            Pair = new Tuple<T, T>(ConvertType(items[0]), ConvertType(items[1]));
        }

        private T ConvertType(string input)
        {
            return (T) Convert.ChangeType(input, typeof (T));
        }
    }

  public class B435
    {
        private readonly InputPair<string> _firstRow;

        public B435(InputPair<string> firstRow)
        {
            _firstRow = firstRow;
        }

        public string Process()
        {
            char[] itemArray = _firstRow.Pair.Item1.ToCharArray();
            int totalSwap = int.Parse(_firstRow.Pair.Item2);

            for (int i = 1; i < itemArray.Length; i++)
            {
                char currentItem = itemArray[i];
                for (int j = totalSwap; j > 0 && totalSwap > 0; j--)
                {
                    int swapToIndex = i - j;
                    if (swapToIndex < 0) continue;

                    char swapToItem = itemArray[swapToIndex];
                    if (currentItem > swapToItem)
                    {
                        itemArray = Shift(itemArray, i, swapToIndex);

                        totalSwap -= j;
                        break;
                    }
                }

                if (totalSwap == 0) break;
            }

            return new string(itemArray);
        }

        public char[] Shift(char[] array, int fromIndex, int toIndex)
        {
            char shifItem = array[fromIndex];
            for (int i = fromIndex; i > toIndex; i--)
                array[i] = array[i - 1];

            array[toIndex] = shifItem;

            return array;
        }
    }
}


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

namespace Codeforces_249_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] S = Console.ReadLine().Split(' ');
            long max = long.Parse(S[0]);
            SortedList<long, byte> ALL = new SortedList<long, byte>();
            List<long> CUR = new List<long>();
            ALL.Add(max, 0);
            CUR.Add(max);
            for (int k = int.Parse(S[1]); 0 < k; --k) {
                List<long> NEW = new List<long>();
                foreach (long L in CUR)
                    for (long d = 1; d < L; d *= 10) {
                        long c1 = L / d;
                        long c2 = (c1 / 10) % 10;
                        c1 %= 10;
                        if (c2 < c1) {
                            long T = L + d * 9 * (c1 - c2);
                            if (!ALL.ContainsKey(T)) {
                                ALL.Add(T, 0);
                                NEW.Add(T);
                                if (max < t) max = T;
                            }
                        }
                CUR = NEW;
            }
            Console.WriteLine(max);
        }
    }
}


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

namespace CODE2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);
            int m = int.Parse(str[2]);
            int r0 = int.Parse(str[3]);
            int [] array = new int[m];
            int ri = (a * r0 + b) % m;
            array[ri] = 0;
            int count = 1;
            for (; ;count++ )
            {
                ri = (a * ri + b) % m;
                if (array[ri] == 0)
                {
                    array[ri] = count;
                }
                else
                {
                    Console.Write(count - array[ri]);
                    return;
                }
            }a
        }
    }
}


using System;
using System.Linq;

namespace Codeforces
{
    class Program
    {
        static void Main(string[] args)
        {
            var m = Convert.ToInt32(Console.ReadLine().Split(" ")[1]);
            var groups = Console.ReadLine().Split(" ");

            var sum = groups.Sum(x => Convert.ToInt32(x));
            var resDouble = (double)sum / m;
            var result = Math.Ceiling(resDouble);

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


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

namespace ConvexShape
{
    class Program
    {
        public static void Main(string[] args)
        {
            int[,] lights = new int[3,3];
            int[,] lightsCumulative = new int[3, 3];
            for (int i = 0; i < 3; ++i)
            {
                string s = Console.ReadLine();
                string[] nums = s.Split(new[]{' '}, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < 3; ++j )
                {
                    lights[i, j] = int.Parse(nums[j]);
                }
            }

            for (int i = 0; i < 3; ++i)
            {
                for (int j = 0; j < 3; ++j)
                {
                    int l=0, r=0, t=0, b=0;
                    l = (i - 1) >= 0 && (i - 1) < 3 ? lights[i - 1,j] : 0;
                    r = (i + 1) >= 0 && (i + 1) < 3 ? lights[i + 1,j] : 0;
                    b = (j + 1) >= 0 && (j + 1) < 3 ? lights[i ,j+1] : 0;
                    t = (j - 1) >= 0 && (j - 1) < 3 ? lights[i ,j-1] : 0;
                    lightsCumulative[i, j] = lights[i, j] + l + r + t + b;

                    Console.Write((lightsCumulative[i, j] + 1) % 2);
                    Console.Write(" ");
                }
                Console.WriteLine();
            }

        }

    }
}


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

namespace N
{
    class Program
    {
        static void Main(string[] args)
        {
            long n = Convert.ToInt32(Console.ReadLine());
            if (n > 3)
            {
                if (n % 2 == 1)
                {
                    long u = n * (n - 1) * (n - 2);
                    Console.WriteLine(u);
                }
                else
                {
                    long max = 1;
                    for (long i = n - 101; i < n - 3; i+=2)
                    {

                        long u = i * (i + 1) * (i + 2);
                        if (u > max)
                        {
                            max = u;
                        }
                        long u = i * (i + 3) * (i + 2);
                        if (u > max)
                        {
                            max = u;
                        }
                    }
                    //if (n == 508)
                    //    max = 130065780;
                    Console.WriteLine(max);
                }
            }
            else
            {
                if (n == 3)
                {
                    Console.WriteLine(6);
                }
                if (n == 2)
                {
                    Console.WriteLine(2);
                }
                if (n == 1)
                {
                    Console.WriteLine(1);
                }
            }
        }
    }
}


//http://codeforces.ru/contest/236/problem/C
using System;

namespace TaskForNOK
{
    class Program
    {
        static void Main()
        {

            UInt64 number = UInt64.Parse(Console.ReadLine());

            UInt64 ans = 1;

            if (number < 3)
            {
                Console.WriteLine(number);
                return;
            }

            for (UInt64 i = max(1,number-5); i <= number; i +=2 )
            {
                for (UInt64 j = max(1,number-5); j <= number; j+=2 )
                {
                    UInt64 per1 = NOK(i,j);
                    for (UInt64 k = max(1,number-5); k <= number; k+=2 )
                    {
                        UInt64 per2 = NOK(per1,k);
                        if (per2 > ans)
                        {
                            ans = per2;
                        }
                    }
                }
            }

            Console.WriteLine(ans);

        }
        static UInt64 NOK(UInt64 a, UInt64 b)
        {
            UInt64 num = a * b;

            while ((a != 0)&&(b != 0))
            {
                if (a > b)
                {
                    a = a % b;
                }
                else
                {
                    b = b % a;
                }
            }

            return (num / (a + b));
        }
    }
}


public class CF{
    public static void Main(){
            int x = int.Parse(Console.ReadLine());
            int ans = 0;
            int t = x;
            for (int i = 5; i >= 1; i--)
            {
                ans += t / i;
                t = t % i;

            }
            Console.Write(ans);
            //Console.ReadKey();

    }
}


using System;

public class Test
{

	public static int maxStep = 5;

	public static void Main()
	{
		int coord = int.Parse(Console.ReadLine());
		int steps = Math.Ceiling(coord/maxStep);

		Console.WriteLine($"{steps}");
	}
}


namespace A
{
    class Program
    {
        static void Main()
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int k = 0, s = 5;
            for (s = 5; n != 0 && s > 0; s--)
            {
                if (n % s == 0)
                {
                    n -= s;
                    k++;
                }
            }
            Console.WriteLine(k);
        }
    }
}


#include <iostream>

using namespace std;

int main()
{
        int n;
        cin >> n;
        cout << (n + 4) / 5 << endl;
}


long X = Convert.ToInt64(Console.ReadLine());
Console.WriteLine(X / 5 + (X % 5 != 0 ? 1 : 0));


using System;

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

            if (n % 5 == 0) Console.WriteLine(n / 5);
            else Console.WriteLine((n / 5) + 1);
        }

        }
    }
}


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

namespace ConsoleApp1
{
    internal class Program
    {

        public static void Main(string[] args)
        {
            //2010200
            string x = Console.ReadLine();
            string k = string.Empty;
            for (int i = x.Count()-1; i >= 0; i--)
                k+= x[i];
            int res = 0;
            for(int i = 0; i < x.Length; i++)
            {
                if(isPal(k))
                {
                    res++;
                    break;0
                }
                else
                {
                    k += "0";
                }
            }

            if(res > 0)
                Console.WriteLine("YES");
            else
                Console.WriteLine("NO");
        }

        public static bool isPal(string k)
        {
            var st = string.Empty;
            for (int i = k.Count() - 1; i >= 0; i--)
                st += k[i];
            if (st == k)
            {
                return true;
            }
            else
                return false;
        }

    }
}


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

namespace C
{
    class Program
    {
        static int max(int a, int b)
        {
            if(a>=b)
                return a;
            else
                return b;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            long  x = int.Parse(s[0]);
            long  y = int.Parse(s[1]);
            int a = max(x-1,y-1);
            int b = max(n-x,n-y);
            if(a<=b)
                Console.WriteLine("White");
            else
                Console.WriteLine("Black");
        }
    }
}
close


using System;

 class Exercise11

{

     static void Main()

     {

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

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

}


using System;
using System.Linq;

class Problem{

    public static void Main(){
        var input = Console.ReadLine().Split(" ").Select(int.Parse).ToArray();
        var worst = input[0] - input[2] - input[1];
        var best = input[0] - input[2] + input[0];
        if (worst > 0) Console.WriteLine("+");
        if (best < 0) Console.WriteLine("-");
        if (best == 0 && worst == 0) Console.WriteLine("0");
        else Console.WriteLine("?");
    }
}


using System;

namespace MyFirstAlgOnC#
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            int n = input[0], t = input[1], k = input[2], d = input[3];
            int timesCook = (int)Math.Ceiling((double)n / k);
            int timeAlone = timesCook * t;
            bool result = Math.Max(timeAlone - t, d + t) < timeAlone;
            Console.WriteLine(result ? "YES" : "NO");
        }
    }
}


using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using Microsoft.Office.Server;
using System.Data;

namespace ConsoleApplicationTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Int32[] arry = new Int32[5];
            int count = Convert.ToInt32(Console.ReadLine());
            if (count < 2 || count > 100) { throw new Exception("Out of Range"); }
            string[] x_temp = Console.ReadLine().Split(' ');
            int[] initArry = Array.ConvertAll(x_temp, Int32.Parse);
            if (initArry.Distinct().Count() != initArry.Length) { throw new Exception("Elements should be distinct"); }
            for (int i = 0; i < initArry.Length; i++) { if (initArry[i] < 1) { throw new Exception("Element should be greater than one"); } }
            int maxIndex = initArry.ToList().IndexOf(initArry.Max()) + 1;
            int minIndex = initArry.ToList().IndexOf(initArry.Min()) + 1;
            if (((maxIndex == 1) || (maxIndex == count)) && ((minIndex == 1) || (minIndex == count)))
            {
                Console.WriteLine(Math.Abs(maxIndex - minIndex));
            }
            else
            {

                arry[0] = Math.Abs(count - minIndex);
                arry[1] = Math.Abs(1 - minIndex);
                arry[2] = Math.Abs(1 - maxIndex);
                arry[3] = Math.Abs(count - maxIndex);
                Console.WriteLine(arry.ToList().Max());
            }
			}
			}
			}


Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{F9BBED00-742E-4EF5-8EC7-AE58D0427A2E}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{F9BBED00-742E-4EF5-8EC7-AE58D0427A2E}.Debug|x86.ActiveCfg = Debug|x86
		{F9BBED00-742E-4EF5-8EC7-AE58D0427A2E}.Debug|x86.Build.0 = Debug|x86
		{F9BBED00-742E-4EF5-8EC7-AE58D0427A2E}.Release|x86.ActiveCfg = Release|x86
		{F9BBED00-742E-4EF5-8EC7-AE58D0427A2E}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


using System;
class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string rs;
            for (int i = 0, cntr = 2; i < input.Length; ++i)
            {
                if (input[i] == '4')
                {
                    if (++cntr > 2) { rs = "NO"; break; }
                }
                else if (input[i] == '1') cntr = 0;
                else { rs = "NO"; break; }
            }
            Console.WriteLine(rs==null?"YES":rs);
        }
    }


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.62
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{222A4524-A140-4F58-867E-F6E861CD2F2C}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{222A4524-A140-4F58-867E-F6E861CD2F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{222A4524-A140-4F58-867E-F6E861CD2F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{222A4524-A140-4F58-867E-F6E861CD2F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{222A4524-A140-4F58-867E-F6E861CD2F2C}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {B7094F77-3830-474D-BFB8-5DE1C52FC44D}
	EndGlobalSection
EndGlobal


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var param = Console.ReadLine().Split(' ');
            int n = int.Parse(param[0]);
            int a = int.Parse(param[1]);
			int b = int.Parse(param[2]);
			n = n - a
            Console.WriteLine(n - Math.Max(0, n - b + 1));
        }
    }
}


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

namespace ConsoleApplication1Bagaeva
{
    class Program
    {
        static void Main(string[] args)
        {
            ulong a = ulong.Parse(Console.ReadLine());
            if(a==1)ConsoleWriteLine(1);else
            {
            Console.WriteLine((a-1)+""+(a+4));
        }}
    }
}


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

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


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

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


   static void Main(string[] args)
        {

            string s = args[0];

            if (s.Length > 100) { Console.WriteLine("Строка превышает длину"); }
            else { Console.WriteLine("Колиество nineteen в строке: " + countstr(s, "nineteen")); }

            Console.ReadLine();
        }

        public static int countstr(string s,string str)
        {

            int count = 0;
            int index = 0;

            while(s.Contains(Convert.ToString(str[index])))
            {
                for(int i=0;i<s.Length;i++)
                {
                    if (str[index] == s[i]) { index++; s = s.Remove(i,1); break; }
                }
                if (index == str.Length-1) { count++; index=0; }
            }

            return count;
        }


 static void Main(string[] args)
        {

            string s = args[0];

            if (s.Length > 100) { Console.WriteLine("Строка превышает длину"); }
            else { Console.WriteLine("Колиество nineteen в строке: " + countstr(s, "nineteen")); }

            Console.ReadLine();
        }

        public static int countstr(string s,string str)
        {

            int count = 0;
            int index = 0;

            while(s.Contains(str[index]))
            {
                for(int i=0;i<s.Length;i++)
                {
                    if (str[index] == s[i]) { index++; s = s.Remove(i,1); break; }
                }
                if (index == str.Length-1) { count++; index=0; }
            }

            return count;
        }


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

namespace CodeForces
{
    public class CodeForces
    {
        static void Main(string[] args)
        {
            var arr = GetArray();
            var n = arr[0];
            var a = arr[1];
            var b = arr[2];
            Console.WriteLine(Solve(n,a,b));
        }

        public static void Tests()
        {
            //\
        }

        public static long Solve(int n, int a, int b)
        {

            var i = 1;
            var k = n - i;
            var max = 0;
            while ( i <= k)
            {
                var m = Math.Min(a / i, b / k);
                var t = Math.Min(a / k, b / i);
                max = Math.Max(max, m);
                max = Math.Max(max, t);
                i++;
                k = n - i;

            }
            return max;

        }

    }
}


using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        double platesCount = inputData[0];
        double firstCakePieces = inputData[1];
        double secondCakePieces = inputData[2];

        double piecesOnFirstPlate;
        double piecesOnSecondPlate;

        double biggestPart;

        int findedValue;

        if (firstCakePieces + secondCakePieces == platesCount)
        {
            findedValue = 1;
        }
        else
        {
            if (firstCakePieces > secondCakePieces)
            {
                biggestPart = Math.Ceiling(platesCount * secondCakePieces / firstCakePieces);
                piecesOnFirstPlate = firstCakePieces / biggestPart;
                piecesOnSecondPlate = secondCakePieces / (platesCount - biggestPart);
            }
            else
            {
                biggestPart = Math.Ceiling(platesCount * firstCakePieces / secondCakePieces);
                piecesOnFirstPlate = firstCakePieces / (platesCount - biggestPart);
                piecesOnSecondPlate = secondCakePieces / biggestPart;
            }

            findedValue = (int) (piecesOnFirstPlate < piecesOnSecondPlate ? piecesOnFirstPlate : piecesOnSecondPlate);
        }
        Console.ReadLine();
    }


using System;
using System.Collections.Generic;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        double platesCount = inputData[0];
        double firstCakePieces = inputData[1];
        double secondCakePieces = inputData[2];

        int findedValue;

        if (firstCakePieces + secondCakePieces == platesCount || firstCakePieces == secondCakePieces)
        {
            findedValue = (int)((firstCakePieces + secondCakePieces) / platesCount);
        }
        else
        {
            double piecesOnFirstPlate;
            double piecesOnSecondPlate;
            double lessPart = firstCakePieces > secondCakePieces
                ? Math.Ceiling(platesCount * secondCakePieces / firstCakePieces)
                : Math.Ceiling(platesCount * firstCakePieces / secondCakePieces);

            if (firstCakePieces > secondCakePieces)
            {
                piecesOnFirstPlate = firstCakePieces / (platesCount - lessPart);
                piecesOnSecondPlate = secondCakePieces / lessPart;
            }
            else
            {
                piecesOnFirstPlate = firstCakePieces / lessPart;
                piecesOnSecondPlate = secondCakePieces / (platesCount - lessPart);
            }

            findedValue = (int) (piecesOnFirstPlate < piecesOnSecondPlate ? Math.Ceiling(piecesOnFirstPlate) : Math.Ceiling(piecesOnSecondPlate));
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}