using System;

namespace _1114A
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c, x, y, z;

            string[] strGrapesRequired;
            string[] strGrapesAvailable;

            strGrapesRequired = Console.ReadLine().Split(" ");
            strGrapesAvailable = Console.ReadLine().Split(" ");

            x = int.Parse(strGrapesRequired[0]);
            y = int.Parse(strGrapesRequired[1]);
            z = int.Parse(strGrapesRequired[2]);

            a = int.Parse(strGrapesAvailable[0]);
            b = int.Parse(strGrapesAvailable[1]);
            c = int.Parse(strGrapesAvailable[2]);

            if ((a + b + c) < (x + y + z) || x > a || y > (a - x + b))
            {
                Console.WriteLine("NO");
                return;
            }

            Console.WriteLine("YES");
            return;
        }
    }
}


using System;

namespace CodeForces
{
    internal static class Test1
    {
        private static void Main(string[] args)
        {
            string[] grapesDemand = Console.ReadLine().Split(" ");
            int andrew = int.Parse(grapesDemand[0]);
            int dmitry = int.Parse(grapesDemand[1]);
            int michal = int.Parse(grapesDemand[2]);

            int demand = andrew + dmitry + michal;

            string[] grapesSupply = Console.ReadLine().Split(" ");
            int green = int.Parse(grapesSupply[0]);
            int purple = int.Parse(grapesSupply[1]);
            int black = int.Parse(grapesSupply[2]);

            int supply = green + purple + black;

            if (supply > demand)
            {
                if (andrew > green)
                    Console.WriteLine("NO");
                if (dmitry > green - andrew + purple)
                    Console.WriteLine("NO");
                if (michal > supply - (andrew + dmitry))
                    Console.WriteLine("NO");
                else
                    Console.WriteLine("YES");
            }
            else
                Console.WriteLine("NO");
        }
    }
}


public class Problem

static void Main()
{
	if (Eat())
		Console.WriteLine("YES");
	else
		Console.WriteLine("NO");

}

static bool Eat()
{
	var s1 = Console.ReadLine();
	var s2 = Console.ReadLine();
	var toEats = s1.Split(' ').Select(s => int.Parse(s)).ToArray();
	var grapes = s2.Split(' ').Select(s => int.Parse(s)).ToArray();
	var andrew = toEats[0];
	var dmitry = toEats[1];
	var michael = toEats[2];

	var green = grapes[0];
	var purple = grapes[1];
	var black = grapes[2];

	if (andrew > green) return false;
	green = green - andrew;

	if (dmitry > green + purple) return false;
	if (michael > black + (green + purple) - dmitry) return false;
	return true;
}
}


class Program
    {
        static string remap(int n)
        {
            string str = "";
            if (n / 5 == 0) str += "O-|";
            else str += "-O|";
            n%=5;
            switch (n){
                case 0: str += "-OOOO";
                    break;
                case 1: str += "O-OOO";
                    break;
                case 2: str += "OO-OO";
                    break;
                case 3: str += "OOO-O";
                    break;
                case 4: str += "OOOO-";
                    break;
            }
            return str;
        }

        static void Main(string[] args)
        {
            string l = Console.ReadLine();
            for (int i = l.Length - 1; i >= 0; i--)
            {
                Console.WriteLine(remap((int)l[i]-48));
            }
        }
    }


using System;

namespace  363A
{
    class Program
    {
        static void Main(string[] args)
        {
            double maxNumber = 1E09;
            double n;
            n = double.Parse(Console.ReadLine());
            if (n< 0 | n > maxNumber)
            {
                return;
            }
            int t = (int)n;
            int[] digits = toDigits(t);
            //printMas(digits);

            for (int i = 0; i <  digits.Length; i++)
            {
                string str = string.Empty;
                int r_int = 0;
                int ost = 0;

                r_int = digits[i] / 5;
                ost = digits[i] % 5;

                if (r_int == 1)
                {
                    str += "-O|";
                }
                else
                {
                    str += "O-|";
                }

                int j = 1;
                for ( j = 1; j <= ost; j++)
                {
                    str += "O";
                }
                if (j <= 4)
                {
                    str += "-";
                    for(int k =j; k <=4;k++)
                        str += "O";
                }

                Console.WriteLine(str);

            }

        }

        private static void printMas(int[] digits)
        {
            for (int i = 0; i < digits.Length; i++)
                Console.WriteLine(digits[i]);
        }

        private static int[] toDigits(int n)
        {
            int t = n;
            int size = 0;
            do
            {
                t /= 10;
                ++size;
            } while (t > 0);
            int[] digits = new int[size];
            t = (int)n;
            for (int i = 0; i < size; i++)
            {
                digits[i] = t % 10;
                t /= 10;
            }
            return digits;
        }
    }
}


using System; using System.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var a = s[0]; var n = s[1];
    var digits = Enumerable.Repeat(0,0).ToList();
    while (a > 0 && n > 0) {
      var d = (int)((n%3 + 3 - a%3) % 3);
      digits.Add(d);
      a /= 3; n /= 3;
    }
    var res = 0;
    for (var i = digits.Length - 1 ; i >= 0 ; i--) res = res*3+digits[i];
    Console.Write(res);
  }
}


using System; using System.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var a = s[0]; var n = s[1];
    var digits = Enumerable.Repeat(0,0).ToList();
    while (a > 0 && n > 0) {
      var d = (int)((n%3 + 3 - a%3) % 3);
      digits.Add(d);
    }
    var res = digits.Aggregate(0, (acc,x) => acc*3+x;
    Console.Write(res);
  }
}


using System; using System.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
    var a = s[0]; var n = s[1];
    var digits = Enumerable.Repeat(0,0).ToList();
    while (a > 0 && n > 0) {
      var d = (int)((n%3 + 3 - a%3) % 3);
      digits.Add(d);
      a /= 3; n /= 3;
    }
    var res = digits.Reverse().Aggregate(0, (acc,x) => acc*3+x);
    Console.Write(res);
  }
}


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

namespace SharpOly
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int n = input[0];
            int m = input[1];
            int need = input[2];
            bool[][] like = new bool[n][
            m]
            ;
            for (int i = 0; i < n; i++)
            {
                var s = Console.ReadLine();
                for (int j = 0; j < m; j++)
                {
                    like[i][j] = s[j] == 'Y';
                }
            }
            int wtfAns = 0;
            for (int j = 0; j < m; j++)
            {
                int cur = 0;
                for (int i = 0; i < n; i++)
                {
                    if (like[i][j])
                    {
                        cur++;
                    }
                }
                if (cur >= need)
                {
                    wtfAns++;
                }
            }
            Console.WriteLine(wtfAns);
        }
    }
}


using System;

public class Solution {
  public static void Main() {
    string line1 = Console.ReadLine();
    string [] line1_nums = line1.Split(" ");
    int F = Convert.ToInt32(line1_nums[0]);
    int I = Convert.ToInt32(line1_nums[1]);
    int T = Convert.ToInt32(line1_nums[2]);
    string [] likes = new string[F];
    for (int f = 0; f < F; ++f) {
      likes[f] = Console.ReadLine();
    }
    int ans = 0;
    for (int i = 0; i < I; ++i) {
      int l = 0;
      for (int f = 0; f < F; ++f) {
        if (likes[f][i] == 'Y') {
          ++l;
        }
      }
      if (l >= T) {
        ++ans;
      }
    }
    Console.WriteLine(ans);
  }
};


using System;public class Solution{public static void Main(){string l=Console.ReadLine();char[]s={' '};string[]o=l.Split(s);int F=Convert.ToInt32(o[0]);int I=Convert.ToInt32(o[1]);int T=Convert.ToInt32(o[2]);string[]p=new string[F];for(int f=0;f<F;++f){p[f]=Console.ReadLine();}int a=0;for(int i=0;i<I;++i){int n=0;for(int f=0;f<F;++f){if(p[f][i]=='Y'){++n;}}if(n>=T){++a;}}Console.WriteLine(a);//kitten}};


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

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

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


using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
    class Program
    {
        public static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int n,m,i,j,a,b;
            n = int.Parse(s[0]);
            m = int.Parse(s[1]);
            i = int.Parse(s[2]);
            j = int.Parse(s[3]);
            a = int.Parse(s[4]);
            b = int.Parse(s[5]);
            int[,] distances=new int[4,2];
            distances[0,0]=i-1;
            distances[0,1]=j-1;
            distances[1,0]=i-1;
            distances[1,1]=m-j;
            distances[2,0]=n-i;
            distances[2,1]=j-1;
            distances[3,0]=n-1;
            distances[3,1]=m-j;
            int[] results=new int[4];
            if ((i == 1 && b == 1) || (i == n && j == 1) || (i == n & j == m) || (i == 1 && j == m))
            {
                Console.WriteLine(0);
                return;
            }
            for (int k = 0; k < 4; k++)
            {
                if (distances[k, 0] % a == 0 && distances[k, 1] % b == 0 && distances[k, 0] / a == distances[k, 1] / b)
                {
                    results[k] = distances[k, 0] / a;
                }
                else
                {
                    results[k] = -1;
                }
            }
            int min = -1;
            for (int k = 0; k < 4; k++)
            {
                if (results[k] < min || min < 0)
                {
                    min = results[k];
                }
            }
            if (min == -1)
            {
                Console.WriteLine("Poor Inna and pony!");
            }
            else
            {
                Console.WriteLine(min);
            }
        }


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

namespace InnaAndPony
{
    class Program
    {

        static void Main(string[] args)
        {
            string[] nmihab = Console.ReadLine().Split(' ');
            int n = Convert.ToInt32(nmihab[0]);
            int m = Convert.ToInt32(nmihab[1]);
            int i = Convert.ToInt32(nmihab[2]);
            int j = Convert.ToInt32(nmihab[3]);
            int a = Convert.ToInt32(nmihab[4]);
            int b = Convert.ToInt32(nmihab[5]);

            if ((((Math.Abs(1 - i) / a) % 2 != (Math.Abs(1 - j) / b) % 2)) && (((Math.Abs(n - i) / a) % 2 != (Math.Abs(1 - j) / b) % 2)) && (((Math.Abs(n - i) / a) % 2 != (Math.Abs(m - j) / b) % 2)) && (((Math.Abs(1 - i) / a) % 2 != (Math.Abs(m - j) / b) % 2)))
            {
                Console.WriteLine("Poor Inna and pony!");
            }
            else
            {
                if (Math.Abs(i - 1) % a == 0)
                    k1 = Math.Abs(i - 1) / a;
                if ((Math.Abs(j - 1) % b == 0) && (Math.Abs(j - 1) / b > k1))
                    k1 = Math.Abs(j - 1) / b;
                if (Math.Abs(i - n) % a == 0)
                    k2 = Math.Abs(i - n) / a;
                if ((Math.Abs(j - 1) % b == 0) && (Math.Abs(j - 1) / b > k2))
                    k2 = Math.Abs(j - 1) / b;
                if (Math.Abs(i - n) % a == 0)
                    k3 = Math.Abs(i - n) / a;
                if ((Math.Abs(j - m) % b == 0) && (Math.Abs(j - m) / b > k3))
                    k3 = Math.Abs(j - m) / b;
                if (Math.Abs(i - 1) % a == 0)
                    k4 = Math.Abs(i - 1) / a;
                if ((Math.Abs(j - m) % b == 0) && (Math.Abs(j - m) / b > k4))
                    k4 = Math.Abs(j - m) / b;
                int k = Math.Max(Math.Max(k1, k2), Math.Max(k3, k4));
                Console.WriteLine(k);
            }
        }
    }
}


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

//namespace Codeforces
//{
//	internal class Template
//	{
//		private void Solve()
//		{
//			var n = cin.NextInt();
//			var x = new List<int>();
//			var y = new List<int>();
//			for (var i = 0; i < n; i++)
//			{
//				x.Add(cin.NextInt());
//				y.Add(cin.NextInt());
//			}
//			x = x.Distinct().ToList();
//			y = y.Distinct().ToList();
//			if (x.Count == 2 && y.Count == 2)
//			{
//				var area = Math.Abs(x[0] - x[1]) * Math.Abs(y[0] - y[1]);
//				Console.WriteLine(area);
//			}
//			else
//			{
//				Console.WriteLine(-1);
//			}
//		}

//		private static readonly Scanner cin = new Scanner();

//		private static void Main()
//		{
//#if DEBUG
//			Console.SetIn(new StreamReader(@"..\..\input.txt"));
//#endif
//			new Template().Solve();
//			Console.ReadLine();
//#if DEBUG
//			Console.ReadKey();
//#endif
//		}
//	}

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

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

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

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

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


using System;
class Program
{
    public static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int[] sayilar = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int toplam = 0;
        for(int i = 0;i<n;i++)
        {
            toplam+=sayilar[i];
        }
        toplam /= n;
        for(int i = 0;i<n;i++)
        {
            for(int j = 0;j<n;j++)
            {
                if(i+j == toplam)
                    Console.WriteLine(i+1+" "+j+1);
            }
        }
        Console.Read();
    }

}


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)(nums.Sum(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 class M
	{
		public static int Sum(this List<short> o, short count)
		{
			short i = 0;
			for (int u = 0; u < count; u++)
			{
				i += o[u];
			}
			return i;
		}
	}
}


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)(nums.Sum(count) / (count / 2));
			deletedNums = new List<short>(count);
			for (short i = 0; i < count / 2; i++)
				n(nums, sum, count);
			Console.Read();
		}
		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 class M
	{
		public static int Sum(this List<short> o, short count)
		{
			short i = 0;
			for (int u = 0; u < count; u++)
			{
				i += o[u];
			}
			return i;
		}
	}
}


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


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

namespace Codeforces_Type_A
{
    class Program
    {
        static void Main(string[] args)
        {
			 int[] a;
            a = getLineInt(Console.ReadLine());
            int sum = a.Sum();
            bool yep = false;
            for (int i = 0; i < a.Length && !yep; i++)
            {
                for (int z = i; z < a.Length && !yep; z++)
                {
                    for (int j = z; j < a.Length && !yep; j++)
                    {
                        int temp = a[i]+a[z]+a[j];
                        if (sum - temp == temp)
                        {
                            yep = true;
                        }
                    }
                }
            }
            Console.WriteLine((yep == true) ? "yes" : "no");
        }
    }
}


using System;
using System.Linq;

namespace Median
{
    class Benches
    {
        public static void Run()
        {
            var benches = int.Parse(Console.ReadLine());
            var m =int.Parse(Console.ReadLine());

            int[] numbers = new int[benches];
            for(int i =0; i< benches; i++)
            {
                numbers[i] = int.Parse(Console.ReadLine()); ;
            }

            //Find Max
            var max = numbers.Max();
            var kMax = max + m;

            Array.Sort(numbers);

            //Find the Min
            while (m > 0)
            {
                var min = numbers[0];
                var secondMin = numbers[1];
                var diff = (secondMin - min) + 1;
                if(m - diff < 0)
                {
                    numbers[0] += m;
                    m = 0;
                }
                else
                {
                    numbers[0] += diff;
                    m -= diff;
                }

                Array.Sort(numbers);

            }

            Console.WriteLine(kMax);
            Console.WriteLine("{0} {1}", numbers.Max(), kMax);
            Console.ReadLine();
        }

    }
}


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

namespace Codeforces
{
    public class MakotoAndABlackboard
    {
        const int MOD = 1000000000 + 7;

        ModMath math = new ModMath(MOD);

        public static void Main()
        {
            StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            new MakotoAndABlackboard().Solve(Console.In, sw);
            sw.Flush();
        }

        public void Solve(TextReader tr, TextWriter tw)
        {
            var a = tr.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            tw.WriteLine(Solve(a[0], a[1]));
        }

        public int Solve(long n, int k)
        {
            var res = 1L;
            for (long a = 2; a <= n; a++)
            {
                var numPrime = 0L;
                while (a <= n && n % a == 0)
                {
                    numPrime++;
                    n /= a;
                }
                if (numPrime == 0)
                {
                    continue;
                }
                var dp = new long[k + 1, numPrime + 1];
                dp[0, numPrime] = 1;
                for (int i = 1; i <= k; i++)
                {
                    for (int j = 0; j <= numPrime; j++)
                    {
                        for (int l = j; l <= numPrime; l++)
                        {
                            dp[i, j] = math.Add(dp[i, j], math.Div(dp[i - 1, l], l + 1));
                        }
                    }
                }

                var t = 0L;
                for (int j = 0; j <= numPrime; j++)
                {
                    t = math.Add(t, math.Mul(dp[k, j], math.Pow(a, j)));
                }
                res = math.Mul(res, t);

            }
            return (int)(res);
        }
    }
}


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

namespace Codeforces
{
    public class MakotoAndABlackboard
    {
        const int MOD = 1000000000 + 7;

        ModMath math = new ModMath(MOD);

        public static void Main()
        {
            StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            new MakotoAndABlackboard().Solve(Console.In, sw);
            sw.Flush();
        }

        public void Solve(TextReader tr, TextWriter tw)
        {
            var a = tr.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            tw.WriteLine(Solve(a[0], a[1]));
        }

        public int Solve(long n, int k)
        {
            var res = 1L;
            for (long a = 2; a * a <= n; a++)
            {
                var np = GetNumPrime(a, n);
                var numPrime = np.Item1;
                n = np.Item2;
                if (numPrime == 0)
                {
                    continue;
                }

                res = math.Mul(res, Calculate(k, a, numPrime));
            }
            if (n != 1)
            {
                res = math.Mul(res, Calculate(k, n, 1));
            }
            return (int)(res);
        }

        private long Calculate(int k, long a, long numPrime)
        {
            var dp = new long[k + 1, numPrime + 1];
            dp[0, numPrime] = 1;
            for (int i = 1; i <= k; i++)
            {
                for (int j = 0; j <= numPrime; j++)
                {
                    for (int l = j; l <= numPrime; l++)
                    {
                        dp[i, j] = math.Add(dp[i, j], math.Div(dp[i - 1, l], l + 1));
                    }
                }
            }

            var t = 0L;
            for (int j = 0; j <= numPrime; j++)
            {
                t = math.Add(t, math.Mul(dp[k, j], math.Pow(a, j)));
            }
            return t;
        }

        Tuple<long, long> GetNumPrime(long a, long n)
        {
            var numPrime = 0L;
            while (n % a == 0)
            {
                numPrime++;
                n /= a;
            }
            return Tuple.Create(numPrime, n);
        }
    }
}


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

namespace Codeforces
{
    public class MakotoAndABlackboard
    {
        const int MOD = 1000000000 + 7;

        ModMath math = new ModMath(MOD);

        public int Solve(long n, int k)
        {
            var res = 1L;
            for (long a = 2; a <= n; a++)
            {
                var numPrime = 0L;
                while (a <= n && n % a == 0)
                {
                    numPrime++;
                    n /= a;
                }
                if (numPrime == 0)
                {
                    continue;
                }
                var dp = new long[k + 1, numPrime + 1];
                dp[0, numPrime] = 1;
                for (int i = 1; i <= k; i++)
                {
                    for (int j = 0; j <= numPrime; j++)
                    {
                        for (int l = j; l <= numPrime; l++)
                        {
                            dp[i, j] = math.Add(dp[i, j], math.Div(dp[i - 1, l], l + 1));
                        }
                    }
                }

                var t = 0L;
                for (int j = 0; j <= numPrime; j++)
                {
                    t = math.Add(t, math.Mul(dp[k, j], math.Pow(a, j)));
                }
                res = math.Mul(res, t);

            }
            return (int)(res);
        }
    }
}


using System;
namespace Whatever {

    class asearch {

        static int N;
        static int numCount;
        static int[] an = new int[2000];

        static void ReadData() {
            Int32.TryParse(Console.ReadLine(), out N);

            var line = Console.ReadLine().Split(new char[]{' '});

            numCount = line.Length;
            for (int i = 1; i <= numCount; ++i)
            {
                Int32.TryParse(line[i-1], out an[i]);
            }
        }

        // BWBWBWBW
        // 101010101  mod 2
        static int NextLoc(int start, int color) {
            if (start % 2 == color) {
                return start;
            } else {
                return start+1;
            }
        }

        static int TrySolve(int color) {
            var poop = new boolean[10000];
            var solved = new boolean[10000];
            for (int i = 1; i<=numCount; ++i) {
                if (a[i] %2 == color) {
                    poop[a[i]] =true;
                    solved[i] = true;
                } else {
                    solved[i] =false;
                }
            }

            var result = 0;

            for (int i = 1; i<=numCount; ++i) {
                if (!solved[i]) {
                    var plc = -1;
                    var plcDis = 10101010;
                    for (int j = 1; j<=N; ++j) {
                        if (!poop[j] && Math.Abs(j-a[i]) < plcDis) {
                            plcDis = Math.Abs(j-a[i]);
                            plc = j;
                        }
                    }
                    poop[j] = true;
                    solved[i] = true;
                    result += Math.Abs(j-a[i]);
                }
            }

            return result;

        }

        static void Main(string[] args) {

            ReadData();
            var minMoves = 2147483600;
            var tmp = TrySolve(0);
            if (tmp != -1 && tmp < minMoves) {
                minMoves = tmp;
            }
             tmp = TrySolve(1);
            if (tmp !=-1 && tmp < minMoves) {
                minMoves = tmp;
            }
            Console.WriteLine(minMoves);
            //Console.WriteLine(Console.ReadLine());
        }

    }
}


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

namespace A_b_V
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            Int64 n = Convert.ToInt64(s[0]);
            Int64 m = Convert.ToInt64(s[1]);
            int count = 0;
            while((n > 0 && m > 0) || (n > 1 && m > 1)
            {
                if (n >= m)
                {
                    n -= 2;
                    m--;
                    count++;
                }
                else
                {
                    n--;
                    m-= 2;
                    count++;
                }
            }
            Console.WriteLine(count);
        }
    }
}


using System;

namespace CSharp
{
    public class _519C
    {
        public static void Main(string[] args)
        {
            string[] tokens = Console.ReadLine().Split();

            int n = int.Parse(tokens[0]);
            int m = int.Parse(tokens[1]);

            Console.WriteLine(Math.Min((n + m) / 3, Math.Min(n, m));
        }
    }
}


using System;

class P {
  static void Main() {
    var n = int.Parse(Console.ReadLine());
    var res = 0;
    for (var c = n; c >= 1; c--) for (var b = c ; b >= 1 ; b--) {
      var sa = c*c-b*b;
      var a = (int)Math.Sqrt(sa);
      if ((a*a == sa && a >= 1 && a <= b) || (a*a+2*a+1 &&a+1>=1 &&a+1 <=b)==sa) res++;
    }
    Console.Write(res);
  }
}


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];

        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.WriteLine(findedValue);
        Console.ReadLine();
    }


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

namespace ConsoleApplication21
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
              int s = 0;
            int[,] a = new int[n, n];
            for (int i = 0; i < n; i++)
            {
                string temp = Console.ReadLine();
                string[] input = temp.Split(' ');
                for (int j = 0; j < n; j++)
                {
                    a[i, j] = int.Parse(input[j]);
                    if (i - j == 0) s += a[i, j];
                    if (i + j == n - 1) s += a[i, j];
                    if (i == (n - 1) / 2) s += a[i, j];
                    if (j == (n - 1) / 2) s += a[i, j];
                }
            }
            s = s - 3 * a[(n - 1) / 2, (n - 1) / 2];
            Console.WriteLine(s);
        }
    }
}


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

class Program
{
    static void Main()
    {
            //Input
        string rookPos = Console.ReadLine();
        string horsePos = Console.ReadLine();

        //Solution
        char blockedLetter = rookPos[0], blockedNumber = rookPos[1];
        string horseCells = GenerateHorseCells(horsePos);

        string GenerateHorseCells(string horsePosition)
        {
            char horseLetter = horsePosition[0], horseNumber = horsePosition[1];
            string res = "";
            res = horsePosition + ((char)(horseLetter - 2) + "" + (char)(horseNumber + 1)) + ""
                                        + ((char)(horseLetter - 2) + "" + (char)(horseNumber - 1)) + ""
                                        + ((char)(horseLetter - 1) + "" + (char)(horseNumber + 2)) + ""
                                        + ((char)(horseLetter - 1) + "" + (char)(horseNumber - 2)) + ""
                                        + ((char)(horseLetter + 1) + "" + (char)(horseNumber + 2)) + ""
                                        + ((char)(horseLetter + 1) + "" + (char)(horseNumber - 2)) + ""
                                        + ((char)(horseLetter + 2) + "" + (char)(horseNumber + 1)) + ""
                                        + ((char)(horseLetter + 2) + "" + (char)(horseNumber - 1)) + "";
            return res;
        }

        int ans = 0;
        for(char q = 'a'; q < 'h'+1; ++q)
        {
            for(char e = '1'; e < '8' +1; ++e)
            {
                string pos = new string(new char[] {q,e});
                string newHorseSells = GenerateHorseCells(pos);
                if (pos != rookPos && pos.Contains(blockedLetter) == false
                    && pos.Contains(blockedNumber) == false
                    && horseCells.Contains(pos) == false
                    && newHorseSells.Contains(rookPos) == false) ++ans;
            }
        }
        Console.WriteLine(ans);
    }
}


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

class Program
{
    static void Main()
    {
            //Input
        string rookPos = Console.ReadLine();
        string horsePos = Console.ReadLine();

        //Solution
        char blockedLetter = rookPos[0], blockedNumber = rookPos[1];
        string horseCells = GenerateHorseCells(horsePos);

        string GenerateHorseCells(string horsePosition)
        {
            char horseLetter = horsePosition[0], horseNumber = horsePosition[1];
            return horsePosition + ((char)(horseLetter - 2) + "" + (char)(horseNumber + 1)) + ""
                                        + ((char)(horseLetter - 2) + "" + (char)(horseNumber - 1)) + ""
                                        + ((char)(horseLetter - 1) + "" + (char)(horseNumber + 2)) + ""
                                        + ((char)(horseLetter - 1) + "" + (char)(horseNumber - 2)) + ""
                                        + ((char)(horseLetter + 1) + "" + (char)(horseNumber + 2)) + ""
                                        + ((char)(horseLetter + 1) + "" + (char)(horseNumber - 2)) + ""
                                        + ((char)(horseLetter + 2) + "" + (char)(horseNumber + 1)) + ""
                                        + ((char)(horseLetter + 2) + "" + (char)(horseNumber - 1)) + "";
        }

        int ans = 0;
        for(char q = 'a'; q < 'h'+1; ++q)
        {
            for(char e = '1'; e < '8' +1; ++e)
            {
                string pos = new string(new char[] {q,e});
                string newHorseSells = GenerateHorseCells(pos);
                if (pos != rookPos && pos.Contains(blockedLetter) == false
                    && pos.Contains(blockedNumber) == false
                    && horseCells.Contains(pos) == false
                    && newHorseSells.Contains(rookPos) == false) ++ans;
            }
        }
        Console.WriteLine(ans);
    }
}


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

namespace Codeforce
{

    class Program
    {
        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static int gcd(int a, int b)
        {

            int rem;
            if (b == 0)
                return a;

            while (true)
            {
                rem = a % b;
                if (rem == 0)
                    break;

                a = b;
                b = rem;
            }
            return b;
        }

        static int lcm(int a, int b)
        {
            return (a / gcd(a, b) * b);
        }

        static void Main(string[] args)
        {
            var data = parseInt(Console.ReadLine());

            int resA = -1, resB = -1;
            double min = double.MaxValue;
            double x = data[0], y = data[1];
            for (int i = 1; i < data[2] + 1; i++)
            {
                int temp = (x * i) / y;

                for (int j = temp - 1; j < temp + 2; j++)
                {
                    double t1 = Math.Abs((x / y) - (double)((double)j / i));
                    if (j >= 0 && t1 >= 0 && min > t1)
                    {
                        min = t1;
                        resA = j;
                        resB = i;
                    }
                }
            }

            int g = gcd(resA, resB);

            Console.WriteLine("{0}/{1}",resA / g, resB / g);
        }
    }
}


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

namespace Codeforce
{

    class Program
    {
        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static int gcd(int a, int b)
        {

            int rem;
            if (b == 0)
                return a;

            while (true)
            {
                rem = a % b;
                if (rem == 0)
                    break;

                a = b;
                b = rem;
            }
            return b;
        }

        static int lcm(int a, int b)
        {
            return (a / gcd(a, b) * b);
        }

        static void Main(string[] args)
        {
            var data = parseInt(Console.ReadLine());

            int resA = -1, resB = -1;
            double min = double.MaxValue;
            double x = data[0], y = data[1];
            for (int i = 1; i < data[2] + 1; i++)
            {
                int temp = (x * )i) / y;

                for (int j = temp - 1; j < temp + 2; j++)
                {
                    double t1 = Math.Abs((x / y) - (double)((double)j / i));
                    if (j >= 0 && t1 >= 0 && min > t1)
                    {
                        min = t1;
                        resA = j;
                        resB = i;
                    }
                }
            }

            int g = gcd(resA, resB);

            Console.WriteLine("{0}/{1}",resA / g, resB / g);
        }
    }
}


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

namespace Codeforce
{

    class Program
    {
        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static int gcd(int a, int b)
        {

            int rem;
            if (b == 0)
                return a;

            while (true)
            {
                rem = a % b;
                if (rem == 0)
                    break;

                a = b;
                b = rem;
            }
            return b;
        }

        static int lcm(int a, int b)
        {
            return (a / gcd(a, b) * b);
        }

        static void Main(string[] args)
        {
            var data = parseInt(Console.ReadLine());

            int resA = -1, resB = -1;
            double min = double.MaxValue;
            double x = data[0], y = data[1];
            for (int i = 1; i < data[2] + 1; i++)
            {
                double temp = (int)(x * (double)i) / y;

                for (int j = temp - 1; j < temp + 2; j++)
                {
                    double t1 = Math.Abs((x / y) - (double)((double)j / i));
                    if (j >= 0 && t1 >= 0 && min > t1)
                    {
                        min = t1;
                        resA = j;
                        resB = i;
                    }
                }
            }

            int g = gcd(resA, resB);

            Console.WriteLine("{0}/{1}",resA / g, resB / g);
        }
    }
}


using System;
using System.Collections.Generic;

namespace Tester
{
    class Program
    {
        static void Main(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            for(int i = 0; i < t; i++)
            {
                int n = int.Parse(Console.ReadLine());
                if (n <= 9)
                {
                    Console.WriteLine(n);
                }
                else
                {
                    var numss = new List<int>();
                    int sum = 0;
                    for (int j = 9; j > 0; j--)
                    {
                        if (sum + j <= n)
                        {
                            nums.Add(j);
                            sum += j;
                        }
                    }
                    numss.Sort();
                    numss.ForEach(Console.Write);
                    Console.WriteLine();
                }
            }

        }
    }
}


using System;
using System.Collections.Generic;
#sadsad
namespace Tester
{
#sdasdas
    class Program
    {
        static void Main(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            for(int i = 0; i < t; i++)
            {
                int n = int.Parse(Console.ReadLine());
                if (n <= 9)
                {
                    Console.WriteLine(n);
                }
                else
                {
                    var nums = new List<int>();
                    int sum = 0;
                    for (int j = 9; j > 0; j--)
                    {
                        if (sum + j <= n)
                        {
                            nums.Add(j);
                            sum += j;
                        }
                    }
                    nums.Sort();
                    nums.ForEach(Console.Write);
                    Console.WriteLine();
                }
            }

        }
    }
}


using System;

namespace MyApp
{
	/// <summary>
	/// Summary description for MyForm class.
	/// </summary>
	class MyForm : Form
	{
		Label Label1;

		public MyForm()
		{
			// Define a label, and specify its text to display, position and size
			Label1 = new Label();
			Label1.Text = "Welcome to MyApp!";
			Label1.AutoSize = true;
			Label1.Location = new Point(30,30);

			// Text to be Displayed in the Caption-Title Bar
			this.Text = "MyApp";
			this.StartPosition = FormStartPosition.CenterScreen;
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.MaximizeBox = false;
			this.Name = "MainForm";

			// Add the label to the array of controls of the form
			this.Controls.Add(Label1);
		}

		public static void Main()
		{
		int n=Convert.ToInt32(Console.ReadLine());
		int c=0,k=0,l=0;
		string s="";
		int[] a=new int[n+1];
		string[] q=new string[n+1];

		    for (int j=1; j<=n; j++)
		    {
		    a[j]=Convert.ToInt32(Console.ReadLine());
		    k=a[j];
		    if (a[j]<=9)
		    {
		    q[j]=a[j].ToString();
		    }
		    else
		    {
		    for (int i=9; i>=1; i--)
			{
			k=k-i;
			if (k>0)
			{
			l=k;
			s=i.ToString()+s;
			}
			q[j]=l.ToString()+s;
			}
			s="";
		    }
		    }
			for (int i=1; i<=n; i++)
		    {
		    Console.WriteLine(q[i]);
		    }
			Console.ReadKey();
		}
	}
}


using System;

namespace MyApp
{

	class MyForm : Form
	{
		Label Label1;

		public MyForm()
		{
			// Define a label, and specify its text to display, position and size
			Label1 = new Label();
			Label1.Text = "Welcome to MyApp!";
			Label1.AutoSize = true;
			Label1.Location = new Point(30,30);

			// Text to be Displayed in the Caption-Title Bar
			this.Text = "MyApp";
			this.StartPosition = FormStartPosition.CenterScreen;
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.MaximizeBox = false;
			this.Name = "MainForm";

			// Add the label to the array of controls of the form
			this.Controls.Add(Label1);
		}

		public static void Main()
		{
		int n=Convert.ToInt32(Console.ReadLine());
		int c=0,k=0,l=0;
		string s="";
		int[] a=new int[n+1];
		string[] q=new string[n+1];

		    for (int j=1; j<=n; j++)
		    {
		    a[j]=Convert.ToInt32(Console.ReadLine());
		    k=a[j];
		    if (a[j]<=9)
		    {
		    q[j]=a[j].ToString();
		    }
		    else
		    {
		    for (int i=9; i>=1; i--)
			{
			k=k-i;
			if (k>0)
			{
			l=k;
			s=i.ToString()+s;
			}
			q[j]=l.ToString()+s;
			}
			s="";
		    }
		    }
			for (int i=1; i<=n; i++)
		    {
		    Console.WriteLine(q[i]);
		    }
			Console.ReadKey();
		}
	}
}


namespace MyApp
{
	/// <summary>
	/// Summary description for MyForm class.
	/// </summary>
	class MyForm : Form
	{
		Label Label1;

		public MyForm()
		{
			// Define a label, and specify its text to display, position and size
			Label1 = new Label();
			Label1.Text = "Welcome to MyApp!";
			Label1.AutoSize = true;
			Label1.Location = new Point(30,30);

			// Text to be Displayed in the Caption-Title Bar
			this.Text = "MyApp";
			this.StartPosition = FormStartPosition.CenterScreen;
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.MaximizeBox = false;
			this.Name = "MainForm";

			// Add the label to the array of controls of the form
			this.Controls.Add(Label1);
		}

		public static void Main()
		{
		int n=Convert.ToInt32(Console.ReadLine());
		int c=0,k=0,l=0;
		string s="";
		int[] a=new int[n+1];
		string[] q=new string[n+1];

		    for (int j=1; j<=n; j++)
		    {
		    a[j]=Convert.ToInt32(Console.ReadLine());
		    k=a[j];
		    if (a[j]<=9)
		    {
		    q[j]=a[j].ToString();
		    }
		    else
		    {
		    for (int i=9; i>=1; i--)
			{
			k=k-i;
			if (k>0)
			{
			l=k;
			s=i.ToString()+s;
			}
			q[j]=l.ToString()+s;
			}
			s="";
		    }
		    }
			for (int i=1; i<=n; i++)
		    {
		    Console.WriteLine(q[i]);
		    }
			Console.ReadKey();
		}
	}
}


namespace ZTCodeforces
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    public static class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine(new MischievousMessMakers().Solve(new TextInputHelper(Console.In)));
        }
    }

    internal class MischievousMessMakers : ISolver
    {
        public string Solve(InputHelper input)
        {
            int n = input.ReadInt(), k = input.ReadInt();
            k = Math.Min(k, n / 2);
            long result = 0, cur = n - 1;
            for (int i = 0; i < k; ++i)
            {
                result += cur + cur - 1;
                cur -= 2;
            }
            return result.ToString();
        }
    }

    internal interface ISolver
    {
        string Solve(InputHelper input);
    }

    internal abstract class InputHelper
    {
        private Queue<string> tokens;
        private IEnumerator<string> current;

        public InputHelper()
        {
            this.tokens = new Queue<string>();
        }

        public int ReadInt()
        {
            ThrowIfNoNext();
            return int.Parse(this.tokens.Dequeue());
        }

        public long ReadLong()
        {
            ThrowIfNoNext();
            return long.Parse(this.tokens.Dequeue());
        }

        public string ReadString()
        {
            ThrowIfNoNext();
            return this.tokens.Dequeue();
        }

        public bool HasNext()
        {
            return this.tokens.Count == 0 ? this.EnsureData() : true;
        }

        /// <summary>
        /// Gets the next group of tokens. Returns null if no more groups are available.
        /// </summary>
        /// <returns>Next group or null.</returns>
        protected abstract IEnumerable<string> GetNextGroup();

        private void ThrowIfNoNext()
        {
            if (!this.HasNext())
            {
                throw new InvalidOperationException("no more data");
            }
        }

        private bool EnsureData()
        {
            if (this.tokens.Count == 0)
            {
                while (this.current == null || !this.current.MoveNext())
                {
                    var next = this.GetNextGroup();

                    if (next == null)
                    {
                        return false;
                    }
                    else
                    {
                        this.current = next.GetEnumerator();
                    }
                }

                this.tokens.Enqueue(this.current.Current);
            }

            return true;
        }
    }

    internal class TextInputHelper : InputHelper
    {
        private TextReader reader;

        public TextInputHelper(TextReader reader)
        {
            this.reader = reader;
        }

        protected override IEnumerable<string> GetNextGroup()
        {
            if (this.reader == null)
            {
                return null;
            }
            else
            {
                var cur = this.reader;
                this.reader = null;
                return cur.ReadWordsToEnd();
            }
        }
    }
}


using System;

public static class Program
{
    public static void Main(string[] args){
         string s = Console.ReadLine();
         int length = s.Count + 1;
         Console.WriteLine((26 * length) - length);
}
}


string s = Console.ReadLine();
int length = s.Count + 1;
Console.WriteLine((26 * length) - length);


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

namespace _937B
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            var timer = new Stopwatch();
            timer.Start();
            var parsedInput = input.Split(' ').Select(x => int.Parse(x)).ToList();
            int hoppers = parsedInput[0];
            int branches = parsedInput[1];

            TightBoolList occupations = new TightBoolList(branches);
            occupations[0] = true;
            occupations[1] = true;

            int top = (int)Math.Sqrt(branches);
            for (int i = 2; i <= hoppers && i <= top; i++)
            {
                if (occupations[i])
                    continue;

                int start = i * (int)Math.Ceiling((double)(hoppers + 1) / i);
                for (int j = start; j <= branches; j += i)
                {
                    occupations[j] = true;
                }
            }

            //int result = -1;
            //for (int i = hoppers + 1; i <= branches; i++)
            //{
            //    if (!occupations[i])
            //        result = i;
            //}

            //Console.WriteLine(result);
            timer.Stop();
            Console.WriteLine(timer.ElapsedMilliseconds);
            Console.ReadLine();
        }

        private unsafe class TightBoolList
        {
            private List<byte> UnderlyingList;

            public int Size { get; private set; }

            public TightBoolList(int size)
            {
                Size = size;
                int capacity = (int)Math.Ceiling(size / 8d) + 1;
                UnderlyingList = new List<byte>(capacity);
                for (int i = 0; i < capacity; i++)
                {
                    UnderlyingList.Add(0);
                }
            }

            public bool this[int i]
            {
                get
                {
                    int index = i / 8;
                    int innerIndex = i % 8;
                    byte containing = UnderlyingList[index];
                    return (containing & (1 << innerIndex)) > 0;
                }
                set
                {
                    int index = i / 8;
                    int innerIndex = i % 8;
                    byte containing = UnderlyingList[index];
                    UnderlyingList[index] = (byte)(containing | (1 << innerIndex));
                }
            }
        }
    }
}


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

namespace CodeForces174DIV2A
{
    class CowsAndPrimitiveRoots
    {
        static void Main(string[] args)
        {
            int p = int.Parse(Console.ReadLine());
            int counter = 0; bool isgood = true; BigInteger cur = 1;
            for (int x = 2; x < p; x++)
            {
                for (int i = 1; i <= p - 2; i++)
                {
                    cur = cur * x;
                    if (cur % p == 1) { isgood = false; break; }
                }
                if (isgood && ((cur*x) % p == 1)) counter++;
                isgood = true; cur = 1;
            }
            Console.WriteLine(counter);
            Console.Read();
        }
    }
}


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

using System.Numerics;
using System.Threading.Tasks;

namespace Codeforce
{

    class Program
    {
        static int[] parseInt(string s)
        {
            string[] temp = s.Split(' ');
            int[] res = new int[temp.Length];
            for (int i = 0; i < temp.Length; i++)
            {
                res[i] = Convert.ToInt32(temp[i]);
            }
            return res;
        }

        static int PowMod(int x, int e, int mod)
        {
            int res;

            if (e == 0)
            {
                res = 1;
            }
            else if (e == 1)
            {
                res = x;
            }
            else
            {
                res = PowMod(x, e / 2, mod);
                res = res * res % mod;
                if (e % 2 > 0)
                    res = res * x % mod;
            }

            return res;
        }

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

            int cnt = 0;
            for (int x = 1; x < n; x++)
            {
                bool tf = true;
                if (PowMod(x, n - 1, n) != 1)
                    tf = false;
                if (tf)
                {
                    for (int p = 1; p < n - 1; p++)
                    {
                        if (PowMod(x, p, n) == 1)
                        {
                            tf = false;
                            break;
                        }
                    }
                }

                if (tf)
                    ++cnt;
            }

            Console.WriteLine(cnt);
        }
    }
}


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


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

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


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

namespace ProblemSets
{
    using System;
    using System.Collections.Generic;
    using System.Collections;
    using System.Linq;
    using System.Text;

    namespace LongPath
    {
        public class Problem420b
        {
            public static void Main(string[] args)
            {
                var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
                var numberOfPeople = input[0];
                var numberOfMessage = input[1];
                var employees = new int[100000 + 1];

                for (int i = 1; i <= numberOfPeople; i++)
                {
                    employees[i] = 99;
                }

                var NotALeader = new ArrayList();

                for (int i = 0; i < numberOfMessage; i++)
                {

                    var status = Console.ReadLine().Split(' ');
                    var symbol = status[0][0];
                    var id = int.Parse(status[1]);

                    if (symbol == '+')
                    {
                        for (int j = 1; j <= numberOfPeople; j++)
                        {
                            if (j == id) continue;
                            if (employees[j] == 1)
                            {
                                NotALeader.Add(id);
                            }
                            if (employees[j] == 0)
                            {
                NotALeader.Add(j);
                            }
                        }
                        employees[id] = 1;
                   }

                    if (symbol == '-')
                    {
                        var prevStatusOfEmployee = employees[id];

                        else if (prevStatusOfEmployee == 1)
                        {

                            for (int j = 1; j <= numberOfPeople; j++)
                            {
                                if (j == id) continue;
                                if (employees[j] == 1 || employees[j]== 0)
                                {
                                    NotALeader.Add(id);
                                }
                            }
                        }
                        else if (prevStatusOfEmployee == 99)
                        {
                            for (int j = 1; j <= numberOfPeople; j++)
                            {
                                if (j == id) continue;
                                if (employees[j] == 1)
                                {
                                    NotALeader.Add(id);
                                    NotALeader.Add(j);
                                }
                            }
                        }

                        employees[id] = 0;
                    }
                    lastEmployeeID = id;
                }

                var leaders = new ArrayList();
                for (int i = 1; i <= numberOfPeople; i++)
                {

                    if (employees[i] == 99 || employees[i] == 1)
                    {
                        if (!NotALeader.Contains(i)) leaders.Add(i);
                    }
                    else if (!NotALeader.Contains(i)) leaders.Add(i);
                }

                var numberOfLeader = leaders.Count;
                Console.WriteLine(numberOfLeader);

                foreach (var leader in leaders)
                {
                    Console.Write(leader);
                    Console.Write(" ");
                }

            }
        }
    }

}


public class Problem420b
    {
        public static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var numberOfPeople = input[0];
            var numberOfMessage = input[1];
            var employees = new int[100000];

            for (int i = 0; i < numberOfPeople; i++)
            {
                employees[i] = 99;
            }

            var NotALeader = new ArrayList();
            for (int i = 0; i < numberOfMessage; i++)
            {
                var  status = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
                var symbol = status[0];
                var id = status[1];
                if (symbol == '+') employees[id] = 1;

                if (symbol == '-')
                {
                    employees[id] = 0;
                    for (int j = 0; j < numberOfPeople; j++)
                    {
                        if (employees[j] == 1)
                        {
                            NotALeader.Add(id);
                        }
                    }
                }
            }

            var leaders = new ArrayList();
            for (int i = 0; i < numberOfPeople; i++)
            {

                if (employees[i] == 99)
                {
                    leaders.Add(i);
                }
                else if (!NotALeader.Contains(i))
                {
                    leaders.Add(i);
                }
            }

        }
    }
}


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

namespace ProblemSets
{
    using System;
    using System.Collections.Generic;
    using System.Collections;
    using System.Linq;
    using System.Text;

    namespace LongPath
    {
        public class Problem420b
        {
            public static void Main(string[] args)
            {
                var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
                var numberOfPeople = input[0];
                var numberOfMessage = input[1];
                var employees = new int[100000 + 1];

                for (int i = 1; i <= numberOfPeople; i++)
                {
                    employees[i] = 99;
                }

                var NotALeader = new ArrayList();

                for (int i = 0; i < numberOfMessage; i++)
                {

                    var status = Console.ReadLine().Split(' ');
                    var symbol = status[0][0];
                    var id = int.Parse(status[1]);

                    if (symbol == '+')
                    {
                        for (int j = 1; j <= numberOfPeople; j++)
                        {
                            if (j == id) continue;
                            if (employees[j] == 1)
                            {
                                NotALeader.Add(id);
                            }
                            if (employees[j] == 0)
                            {
                NotALeader.Add(j);
                            }
                        }
                        employees[id] = 1;
                   }

                    if (symbol == '-')
                    {
                        var prevStatusOfEmployee = employees[id];

                        if (prevStatusOfEmployee == 1)
                        {

                            for (int j = 1; j <= numberOfPeople; j++)
                            {
                                if (j == id) continue;
                                if (employees[j] == 1 || employees[j]== 0)
                                {
                                    NotALeader.Add(id);
                                }
                            }
                        }
                        else if (prevStatusOfEmployee == 99)
                        {
                            for (int j = 1; j <= numberOfPeople; j++)
                            {
                                if (j == id) continue;
                                if (employees[j] == 1)
                                {
                                    NotALeader.Add(id);
                                    NotALeader.Add(j);
                                }
                            }
                        }

                        employees[id] = 0;
                    }
                    lastEmployeeID = id;
                }

                var leaders = new ArrayList();
                for (int i = 1; i <= numberOfPeople; i++)
                {

                    if (employees[i] == 99 || employees[i] == 1)
                    {
                        if (!NotALeader.Contains(i)) leaders.Add(i);
                    }
                    else if (!NotALeader.Contains(i)) leaders.Add(i);
                }

                var numberOfLeader = leaders.Count;
                Console.WriteLine(numberOfLeader);

                foreach (var leader in leaders)
                {
                    Console.Write(leader);
                    Console.Write(" ");
                }

            }
        }
    }

}


<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{278E3467-7E64-46DE-AC00-08AC85518C02}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>CodeForces</RootNamespace>
    <AssemblyName>CodeForces</AssemblyName>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkSubset>
    </TargetFrameworkSubset>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>


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

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

Console.WriteLine( result );


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}") = "Doma", "Doma\Doma.csproj", "{A9B7035C-8A7C-4EAC-8F58-4E6B7809A1D7}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{A9B7035C-8A7C-4EAC-8F58-4E6B7809A1D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{A9B7035C-8A7C-4EAC-8F58-4E6B7809A1D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{A9B7035C-8A7C-4EAC-8F58-4E6B7809A1D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{A9B7035C-8A7C-4EAC-8F58-4E6B7809A1D7}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


using System;

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

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


using System;

class P {
    static void Main() {
        int n = 8;
        var rows = Console.In.ReadToEnd().Split('\n');
        var count = 0;
        for (int i = 0; i < n; i++) {
            var cnt = n;
            for (int j = 0; j < n; j++) {
                if (rows[i][j] == 'B') { cnt--; }
            }
            if (cnt == 0) { count++; }
        }

        for (int i = 0; i < n; i++) {
            var cnt = n;
            for (int j = 0; j < n; j++) {
                if (rows[j][i] == 'B') { cnt--; }
            }
            if (cnt == 0) { count++; }
        }
        if (count == 16) count == 8;
        Console.WriteLine(count);
    }
}


if (m % i != 0 && m % i <= item) ++coef;


using System;
using System.Collections;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(maximize());
        }
        public static long maximize()
        {
            int size;
            int T;
            long val = 0;
            string[] str = Console.ReadLine().Split(" ");
            size = int.Parse(str[0]);
            T = int.Parse(str[1]);
            int[] num_of_boxes = new int[T];
            long[] num_of_matches = new long[T];
            for (int i = 0; i < T; ++i)
            {
                str = Console.ReadLine().Split(" ");
                num_of_boxes[i] = int.Parse(str[0]);
                num_of_matches[i] = int.Parse(str[1]);
            }
            while(size > 0)
            {
                long max = 0;
                for(int i = 0; i < T; ++i)
                {
                    if (num_of_matches[max] < num_of_matches[i])
                        max = i;
                }
                if(size > num_of_boxes[max])
                {
                    val += num_of_boxes[max] * num_of_matches[max];
                    size -= num_of_boxes[max];
                }
                else
                {
                    val += size * num_of_matches[max];
                    size = 0;
                }
                num_of_boxes[max] = int.MinValue;
                num_of_matches[max] = long.MinValue;
            }
            return val;
        }
    }
}


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

namespace CodeForces._265
{
    PUBLIC class ProblemA
    {
        public static void Main(string[]  varg)
        {
            int n = int.Parse(System.Console.ReadLine());
            string s = System.Console.ReadLine();

            int rv = 0;
            foreach(var c in s)
            {
                rv++;
                if (c == '0')
                    break;
            }
            System.Console.WriteLine(rv);
        }
    }
}


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

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

#if DEBUG
			TextReader reader = new StreamReader("../../input.txt");

#else
			TextReader reader = Console.In;
#endif

			#region INIT
			int[] c1 = reader.ReadLine().Split(' ').Select(i => int.Parse(i)).ToArray();

			int k = c1[0];
			int b = c1[1];
			int n = c1[2];
			int t = c1[3];

			#endregion

			long z = 1;
			for (int i = 0; i < n; i++) {
				z = k * z + b;
			}

			int res = z;

			z = t;
			long j = 0;
			while(true) {
				if (z >= res)
					break;
				j++;
				z = k * z + b;
			}

			Console.WriteLine(j);

#if DEBUG
			Console.ReadKey();
#endif

		}

	}
}


using System;
using System.Linq;
using System.Numerics;

class P1178C
{
  const int P = 998244353;

  static void Main()
  {
    int[] args =
      Console.ReadLine()
      .Split(' ', StringSplitOptions.RemoveEmptyEntries)
      .Select(Int32.Parse)
      .ToArray();
    int w = args[0];
    int h = args[1];

    int exp = w + h;

    BigInteger answer = BigInteger.ModPow(2, exp, P);

    Console.WriteLine(answer);
  }
}


using System;
class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            StringBuilder stringBuilder = new StringBuilder();
            for(int i = 0, crr=0; i<input.Length;)
            {
                if(input[i++]=='.')
                {
                    stringBuilder.Append((crr==0?'0':'1'));
                    crr = 0;
                }
                else
                {
                    if (crr == 0) crr++;
                    else { stringBuilder.Append('2'); crr = 0; }
                }
            }
            Console.WriteLine(stringBuilder.ToString());
        }
    }


namespace PostcardAndPhotos
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string Ps = "PPPPP";
            string Cs = "CCCCC";
            string change = "XXXXX";
            int result = 0;
            int count = 5;
            int Xs = 0;
            while (Xs != input.Length)
            {
                Regex rr = new Regex(Cs.Substring(0, count));
                while (rr.IsMatch(input))
                {
                    int index = rr.Match(input).Index;
                    input = input.Insert(index, change.Substring(0, count));
                    input = input.Remove(index + count, count);
                    result++;
                }
                Regex r = new Regex(Ps.Substring(0, count));
                while (r.IsMatch(input))
                {
                    int index = r.Match(input).Index;
                    input = input.Insert(index, change.Substring(0, count));
                    input = input.Remove(index + count, count);
                    result++;
                }
                count--;
                Xs = input.Select(x => x).Where(x => x == 'X').Count();
            }
            Console.WriteLine(result);
            Console.ReadLine();
        }
    }
}


using System;

class P {
  static void Main() {
    var s = Console.ReadLine()+"z";
    var res = 0;
    var cur = 0;
    var last = 'a';
    foreach (var c in s)
      if (c == last) {
        if (++cur == 5) { cur = 0; res++; }
      } else {
        if (cur > 0) res++;
        cur = 1; last = c;
      }
    }
    Console.Write(res);
  }
}


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

public class NewYearsEve : ISolution
    {
        public override void Solve()
        {
            ulong[] NandK = ReadArrString().Select(ulong.Parse).ToArray();
            if(NandK[1]==1)
            {
                Console.Write(Nandk[0]);
                return;
            }
            sbyte logN = (sbyte)(NandK[0] != 1 ? Math.Floor(Math.Log(NandK[0], 2)) : 0);
            sbyte i = (NandK[1] >= (ulong)logN ? logN : (sbyte)NandK[1]);
            while (i >= 0)
            {
                ulong result = (ulong)(NandK[0] & (ulong)(1 << i));
                if (result == 0)
                {
                    NandK[0] ^= (ulong)(1 << i--);
                }
                else
                {
                    i--;
                }
            }
            Console.Write(NandK[0]);
        }
    }

    public abstract class ISolution
    {
        public static Func<int> ReadInt = () => int.Parse(Console.ReadLine().Trim());
        public static Func<short> ReadShort = () => short.Parse(Console.ReadLine().Trim());
        public static Func<string> ReadString = () => Console.ReadLine().Trim();
        public static Func<byte> ReadByte = () => byte.Parse(Console.ReadLine().Trim());
        public static StringBuilder output = new StringBuilder();
        public static Func<string[]> ReadArrString = () => ReadString().Split(' ').ToArray();
        public abstract void Solve();
    }

    class Solution
    {
        static void Main(string[] args)
        {
            new NewYearsEve().Solve();
            Console.ReadLine();
        }
    }


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

public class NewYearsEve : ISolution
    {
        public override void Solve()
        {
            ulong[] NandK = ReadArrString().Select(ulong.Parse).ToArray();
            if(NandK[1]==1)
            {
                Console.Write(NandK[0]);
                return;
            }
            while (NandK[0]>=0)
            {
                ulong result = 2*result + 1;
                NandK[0]>>=1;
            }
            Console.Write(result);
        }
    }

    public abstract class ISolution
    {
        public static Func<int> ReadInt = () => int.Parse(Console.ReadLine().Trim());
        public static Func<short> ReadShort = () => short.Parse(Console.ReadLine().Trim());
        public static Func<string> ReadString = () => Console.ReadLine().Trim();
        public static Func<byte> ReadByte = () => byte.Parse(Console.ReadLine().Trim());
        public static StringBuilder output = new StringBuilder();
        public static Func<string[]> ReadArrString = () => ReadString().Split(' ').ToArray();
        public abstract void Solve();
    }

    class Solution
    {
        static void Main(string[] args)
        {
            new NewYearsEve().Solve();
            Console.ReadLine();
        }
    }


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

public class NewYearsEve : ISolution
    {
        public override void Solve()
        {
            ulong[] NandK = ReadArrString().Select(ulong.Parse).ToArray();
            ulong result;
            if(NandK[1]==1)
            {
                Console.Write(NandK[0]);
                return;
            }
            while (NandK[0]>=0)
            {
                result = 2*result + 1;
                NandK[0]>>=1;
            }
            Console.Write(result);
        }
    }

    public abstract class ISolution
    {
        public static Func<int> ReadInt = () => int.Parse(Console.ReadLine().Trim());
        public static Func<short> ReadShort = () => short.Parse(Console.ReadLine().Trim());
        public static Func<string> ReadString = () => Console.ReadLine().Trim();
        public static Func<byte> ReadByte = () => byte.Parse(Console.ReadLine().Trim());
        public static StringBuilder output = new StringBuilder();
        public static Func<string[]> ReadArrString = () => ReadString().Split(' ').ToArray();
        public abstract void Solve();
    }

    class Solution
    {
        static void Main(string[] args)
        {
            new NewYearsEve().Solve();
            Console.ReadLine();
        }
    }


using System;
using System.Linq;
using CompLib.Util;

public class Program
{

    public void Solve()
    {
        var sc = new Scanner();
#if !DEBUG
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
#endif
        int t = sc.NextInt();
        for (int i = 0; i < t; i++)
        {
            Q(sc);
        }
        Console.Out.Flush();
    }

    void Q(Scanner sc)
    {
        int n = sc.NextInt();
        int m = sc.NextInt();
        int k = sc.NextInt();

        // k個 横向き
        // n*m/2-k個縦
        //
        //
        //
        //
        //
        char[][] ans = new char[n][];
        for (int i = 0; i < n; i++) ans[i] = new char[m];
        if (m % 2 == 0)
        {
            if (n % 2 == 0)
            {
                // 横向き 偶数段
                if (k % 2 != 0)
                {
                    Console.WriteLine("NO");
                    return;
                }
            }
            else
            {
                // 横向き 奇数段
                if (k < m / 2 || (k - m / 2) % 2 != 0)
                {
                    Console.WriteLine("NO");
                    return;
                }
            }
        }
        else
        {
            // n偶数
            if (k % 2 != 0)
            {
                Console.WriteLine("NO");
                return;
            }
        }

        Console.WriteLine("YES");
    }

    public static void Main(string[] args) => new Program().Solve();
    // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();
}

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

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

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

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

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

            return _line[_index++];
        }

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

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

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

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


/* Date: 22.03.2018 * Time: 21:45 */
// *

/*
�	fflush(stdout) � ����� C++;
�	System.out.flush() � Java;
�	stdout.flush() � Python;
�	flush(output) � Pascal;

*/

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

class Example
{
	public static void Main (string[] args)
	{
# if ( ! ONLINE_JUDGE )
		StreamReader sr = new StreamReader ("C:\\TRR\\2018\\Task\\07 Codeforces\\030\\B.TXT");
		StreamWriter sw = new StreamWriter ("C:\\TRR\\2018\\Task\\07 Codeforces\\030\\B.OUT");
# endif

		NumberFormatInfo nfi = NumberFormatInfo.InvariantInfo;

		int n;

# if ( ONLINE_JUDGE )
		n = int.Parse (Console.ReadLine ());
# else
		n = int.Parse (sr.ReadLine ());
		sw.WriteLine ("n = " + n);
# endif

		string s;

# if ( ONLINE_JUDGE )
		s = Console.ReadLine ();
# else
		s = sr.ReadLine ();
		sw.WriteLine (s);
# endif

		int [] kol = new int [n];
		int [] kmp = new int [n];

		KMP (s, kmp);

# if ( ! ONLINE_JUDGE )
		for ( int i=0; i < n; i++ )
			sw.Write (kmp [i]);
		sw.WriteLine ();
# endif

		int k = 0;
		if ( n < 4 )
			k = 0;
		else
			for ( int i=n-1; i > n/2; i-- )
				if ( i % 2 == 1 )
				{
					if ( kmp [i] == (i+1)/2 )   // �� ����� ������ ����!!!
					{
						k = i/2;
						break;
					}
				}

		n -= k;
/*
		kol [0] = 1; //kol [1] = 2; kol [2] = 3;
		for ( int i=1; i < n; i++ )
		{
			if ( i % 2 == 0 )
				kol [i] = kol [i-1] + 1;
			else
				if ( kmp [i] == (i+1)/2 )   // �� ����� ������ ����!!!
					kol [i] = Math.Min (kol [i-1], kol [i/2]) + 1;
				else
					kol [i] = kol [i-1] + 1;
		}
*/
/*
# if ( ! ONLINE_JUDGE )
		for ( int i=0; i < n; i++ )
			sw.Write (kol [i]);
		sw.WriteLine ();
# endif

# if ( ONLINE_JUDGE )
		Console.WriteLine (kol [n-1]);
# else
		sw.WriteLine (kol [n-1]);
		sw.Close ();
# endif
*/

# if ( ONLINE_JUDGE )
		Console.WriteLine (n]);
# else
		sw.WriteLine (n);
		sw.Close ();
# endif

	}

	public static void KMP (string s, int [] kmp)
	{
		int n = s.Length;
		kmp [0] = 0;
		for ( int i=1; i < n; i++ )
		{
			int j = kmp [i-1];
			while ( j > 0 && s [i] != s [j] )
				j = kmp [j-1];
			if ( s [i] == s [j] )
				j++;
			kmp [i] = j;
		}
	}
}


using System;

namespace Экзамен
{
    class Program
    {
        static void Main()
        {
            string nk = Console.ReadLine();
            string[] kn = nk.Split(' ');
            int n = int.Parse(kn[0]);
            int k = int.Parse(kn[1]);

            if (3 * n > k)
            {
                Console.WriteLine(3 * n - k);
            }
            else
            {
                Console.WriteLine("0");
            }

        }
    }
}


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

namespace ConsoleApplication1
{
    class Program
    {
        static int nextInt()
        {
            int t = Console.Read();
            while ((t < '0' || t > '9') && t != '-') t = Console.Read();
            int sign = 1;
            if (t == '-')
            {
                sign = -1;
                t = Console.Read();
            }
            int x = 0;
            while (t >= '0' && t <= '9')
            {
                x *= 10;
                x += t - '0';
                t = Console.Read();
            }
            return x * sign;
        }
        static void Main(string[] args)
        {
            int n = nextInt();
            int k = nextInt();
            if (n * 3 <= k)
                Console.WriteLine(0);
            else
                Console.WriteLine(n * 3 - k);
            n = nextInt();
        }
    }
}


class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(long.Parse(Console.ReadLine()) / 2520L);
        }
    }


using System;
using Systenm.Linq;

class P {
  static void Main() {
    var s = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var a = s[0]; var x = s[1]; var y = s[2];
    if (y < a && y > 0) {
      Console.Write(2*Math.Abs(x) < a ? 1 : -1);
      return;
    }
    var add = y / (2*a);
    y %= 2*a;

    if (y < a && y > 0) {
      Console.Write(2*Math.Abs(x) < a ? 2+3*add : -1);
      return;
    }
    if (y < 2*a && y > a) {
      Console.Write(x != 0 && Math.Abs(x) < a ? 2+3*add+(x<0?1:2) : -1);
      return;
    }
    Console.Write(-1);
  }
}


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

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

            int n = 0, m = 0;
            Input2number(out n,out m);
            for(int i=0;i<m;i++)
            {
                int u, v;
                Input2number(out u, out v);
            }
            if (n < 7)
            {
                Console.WriteLine(m);
            }
            else
            {
                if(m>16)
                {
                    Console.WriteLine(16);
                }
                else
                {
                    Console.WriteLine(m);
                }
            }

            void Input2number(out int a,out int b)
            {
                bool f = false;
                string s = Console.ReadLine(), str = "";
                s += " ";
                b = a = 0;
                for (int i = 0; i < s.Length; i++)
                {
                    if (s[i] == ' ')
                    {
                        if (f) b = Convert.ToInt32(str);
                        else { a = Convert.ToInt32(str); f = true; }
                        str = "";
                    }
                    else
                    {
                        str += s[i];
                    }
                }
            }
        }
    }
}
// 1 7 11 5


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 BinSe(int l, int r)
        {
                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 = long.Parse(ar[0]);
            long k = long.Parse(ar[1]);

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

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


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 BinSe(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 : BinSe(0, k - 1, k, n));
        }
    }

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


using System;
using System.Linq;
using System.Runtime.Intrinsics.X86;
using static System.Console;
namespace test
{
    class Program
    {
        private static string[] a = new string[3];
        private static bool b = false;
        static void Main()
        {
            a[0] = ReadLine();
            a[1] = ReadLine();
            a[2] = ReadLine();
            check("rock", "scissors");
            check("scissors", "paper");
            check("paper", "rock");
            if (b == false)
                WriteLine("?");
        }
        private static void check(string ar, string br)
        {
            int index = 4;
            int licznik = 0;
            for (int i = 0; i < 3; i++)
            {
                if (a[i].Equals(ar)) index = i;
                else if (a[i].Equals(br)) licznik++;
            }
            if (licznik == 2 && index != 4) winner(index);
        }
        private static void winner(int i)
        {
            b = true;
            if (i == 0) WriteLine("F");
            if (i == 1) WriteLine("M");
            if (i == 2) WriteLine("S");
        }
    }
}


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

            var strings = Console.ReadLine();

            var hi = strings.Split(' ').ToList();

            var numbers = hi.Select(x => int.Parse(x)).ToList();
            numbers.Sort();

            var answer = 0;

            var lastNumber = numbers.Last();

            if (lastNumber >= 25)
            {
                answer = lastNumber - 25;
            }

            Console.WriteLine(answer);
        }


	using System;
	using System.Linq;

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

            var arr = Console.ReadLine().Split(' ').Select(int.Parse).ToHashSet();

            int j = 1;
            for (int i = 0; i < n; i ++)
            {
                while(!arr.Contains(j))
                {
                    j++;
                }
                j++;
            }

            Console.WriteLine(j - n - 1);
        }
    }


#include <stdio.h>
#include<vector>
#include<iostream>
typedef long long int ll;

constexpr ll Mod = (119 << 23) + 1;
constexpr int E = 23;
constexpr ll O = 31;
constexpr ll InvO = 128805723;

ll Z[E + 1], InvZ[E + 1];

void Init() {
	Z[E] = O;
	InvZ[E] = InvO;
	for (int i = E - 1; i >= 0; i--) {
		Z[i] = (Z[i + 1] * Z[i + 1]) % Mod;
		InvZ[i] = (InvZ[i + 1] * InvZ[i + 1]) % Mod;
	}
}

ll Pow(ll x, ll y) {
	ll result = 1;
	while (y > 0)
	{
		if (y % 2 == 1) {
			result *= x;
			result %= Mod;
		}
		x *= x;
		x %= Mod;
		y /= 2;
	}

	return result;
}

ll Inv(ll x) {
	return Pow(x, Mod - 2);
}

// d桁のvを逆順にする
int bits_rev(int v, int d)
{
	int result = 0;
	for (int i = 0; i < d; i++) {
		if ((v & (1 << i))) result |= 1 << (d - i - 1);
	}
	return result;
}

void Transform(std::vector<ll>& a, int len, int lg, bool inverse) {
	for (int i = 0; i < len; i++) {
		int rev = bits_rev(i, lg);
		if (i >= rev) continue;
		ll t = a[i];
		a[i] = a[rev];
		a[rev] = t;
	}

	for (int i = 1; i <= lg; i++) {
		int b = 1 << (i - 1);
		ll z = 1;
		for (int j = 0; j < b; j++) {
			for (int k = j; k < len; k += (b << 1)) {
				ll t = (z * a[k + b]) % Mod;
				ll u = a[k];
				a[k] = (u + t) % Mod;
				a[k + b] = (u - t) % Mod;
				if (a[k + b] < 0) a[k + b] += Mod;
			}
			z *= inverse ? InvZ[i] : Z[i];
			z %= Mod;
		}
	}
}

void Convolution(std::vector<ll>& a, std::vector<ll> b, bool eq) {
	int sz = a.size() + b.size() - 1;
	int len = 1;
	int lg = 0;
	while (len < sz)
	{
		lg++;
		len *= 2;
	}

	a.resize(len);
	Transform(a, len, lg, false);

	if (eq) {
		for (int i = 0; i < len; i++) {
			a[i] *= a[i];
			a[i] %= Mod;
		}
	}
	else {
		b.resize(len);
		Transform(b, len, lg, false);
		for (int i = 0; i < len; i++) {
			a[i] *= b[i];
			a[i] %= Mod;
		}
	}

	Transform(a, len, lg, true);

	ll inv = Inv(len);

	for (int i = 0; i < sz; i++) {
		a[i] *= inv;
		a[i] %= Mod;
	}
	a.resize(sz);
}

int main(void) {
	Init();

	int n, k;
	scanf("%d %d", &n, &k);
	std::vector<ll> f;
	f.resize(1);
	f[0] = 1;

	std::vector<ll> t;
	t.resize(10);
	for (int i = 0; i < k; i++) {
		int d;
		scanf("%d", &d);
		t[d] = 1;
	}

	int h = n / 2;
	while (h > 0)
	{
		if (h % 2 == 1) {

			Convolution(f, t, false);
		}
		Convolution(t, t, true);
		h /= 2;
	}

	ll ans = 0;
	for (int i = 0; i < f.size(); i++) {
		ans += (f[i] * f[i]) % Mod;
		ans %= Mod;
	}

	printf("%lld", ans);
	return 0;
}