import java.util.Scanner;
public class Racing {
 public static void main(String[] args) {
  int[] f = new int[100];
  int h;
  int m;
  int s;
  int t1;
  int t2;
  Scanner input = new Scanner(System.in);
  h = input.nextInt();
  m = input.nextInt();
  s = input.nextInt();
  t1 = input.nextInt();
  t2 = input.nextInt();
  h *= 5;
  t2 *= 5;
  t1 *= 5;
  h %= 60;
  t1 %= 60;
  t2 %= 60;
  f[a1]++;
  f[b1]++;
  f[c1]++;
  if (t1 > t2) {
   int t;
   t = t1;
   t1 = t2;
   t2 = t;
  }
  int ans = 0;
  for (int i = t1; i < t2; i++){// no curly braces
   ans += f[i];
  if (ans % 3 == 0)
   System.out.println("YES");
  else
   System.out.println("NO");
   }
 }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test {
  private static final int mod = 100000007;
  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String str = reader.readLine();
    int[] digitCount = new int[10];
    long[] dp = new long[mod];
    int digitsMask = init(digitCount, str, dp);
    System.out.println(solve(digitCount, true, str.length(), "", 0, digitsMask, dp));
  }

  private static int init(int[] digitCount, String str, long[] dp) {
    int mask = 0;
    for(char a: str.toCharArray()) {
      mask |= (1 << (a - '0'));
      digitCount[a - '0']++;
    }
    for(int i = 0; i < dp.length; i++) {
      dp[i] = -1;
    }
    return mask;
  }

  private static long solve(int[] digitCount, boolean start, int rem, String current, int mask, int digitsMask, long[] dp) {
    if(rem == 0) {
      return 1;
    }
    int hash = getHash(digitCount);

    if(dp[hash] != -1){
      return dp[hash];
    }

    long ans = mask == digitsMask? 1: 0;
    int end = start? 1: 0;
    for(int i = 9; i >= end; i--) {
      if(digitCount[i] != 0) {
        digitCount[i]--;
        ans += solve(digitCount, false, rem - 1, current + i, mask | (1 << i), digitsMask, dp);
        digitCount[i]++;
      }
    }
    return dp[hash] = ans;
  }

  private static int getHash(int[] digitsCount) {
    int base = 1;
    int res = 0;
    for(int i = 0; i < 10; i++) {
      res = (res % mod + (base * digitsCount[i]) % mod) % mod;
      base = (base % mod * 23) % mod;
    }
    return res;
  }
}


///////////////////package acm;

import java.util.*;

import acm.second.Scanner;

import java.io.*;

public class first {
	static PrintWriter out;

	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		// BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long n = sc.nextLong();
		long x = sc.nextLong();
		long y=sc.nextLong();
		long ma=Math.max(n-x,n-y);
		long mb=Math.max(x-1, y-1);
		if(ma<mb)
			out.println("Black");
		else
			out.println("White");
		//out.println();
		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main implements Runnable {

	private void solve() throws IOException {
		HashMap<String, ArrayList<HashMap<String, Integer>>> recipe = new HashMap<String, ArrayList<HashMap<String,Integer>>>();
		ArrayList<Map<String, Integer>> backpacks = new ArrayList<Map<String,Integer>>();
		int k = nextInt();
		int n = nextInt();
		int m = nextInt();
		int q  = nextInt();
		for (int i  =0)
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new Thread(new Main()).start();

	}

	private BufferedReader br;
	private StringTokenizer st;
	private PrintWriter out;

	@Override
	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer("");
			out = new PrintWriter(System.out);
			solve();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}

	}

	String next() throws IOException {
		while (!st.hasMoreTokens()) {
			String temp = br.readLine();
			if (temp == null) {
				return null;
			}
			st = new StringTokenizer(temp);
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

}


import java.io.*;
import java.util.*;

public class Solution {

       static void ans(int pos,int mera,int chotu)
       {

           int flag=0;
           int flag2=0;
           int pehla=-1;

           for(int my=mera;pehla==-1;my--)
           {

                int i = (my/50)%475;
                int j=25;

                while(j-->0)
                {
                    i = (i * 96 + 42)% 475  ;

                    if((26+i)==pos)
                    {
                        pehla=my;
                        flag=1;
                            break;
                    }
                }

                 if(flag==1)
                  break;
          }

      //     System.out.println(mera-pehla);

           int dusra=-1;

           for(int my=mera;dusra==-1;my++)
           {

                int i = (my/50)%475;
                int j=25;

                while(j-->0)
                {
                    i = (i * 96 + 42)% 475  ;

                    if((26+i)==pos)
                    {
                        dusra=my;
                        flag2=1;
                            break;
                    }
                }

                 if(flag2==1)
                  break;
          }

         //   System.out.println();

           if((dusra-mera)>(mera-pehla))
           {
             System.out.println(0) ;
           }
           else
           {
               int dif=dusra-mera;

               int hacks=dif/100;
               if(dif%100!=0)
                   hacks++;

               System.out.println(hacks);

           }

     }

    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);

            int n=sc.nextInt();

            int my=sc.nextInt();
            int min=sc.nextInt();

            ans(n,my,min);

    }
}


//package codeforeces370;

import java.io.*;
import java.util.*;
import java.math.*;

public class q1{
	static int mod=(int)(1e9+7);
	public static void main(String[] ags)
	{
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		//int n=in.nextInt();
		//int[] a=readint(in,n);
		int a=in.nextInt();
		int b=in.nextInt();
		int k=in.nextInt();
		int t=in.nextInt();
		long[][] dp=new long[2*k*t+1001][t+1];
		int offset=k*t;
		dp[offset][0]=1;
		for(int i=1;i<=t;i++)
		{

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

					dp[j+offset-k][i]+=dp[j+offset][i-1];
					dp[j+offset-k][i]%=mod;
				}
				/*for(int f=-k*t;f<=k*t;f++)
				{
					System.out.println("for "+i+" f "+f+" "+dp[f+offset][i]);
				}
				System.out.println("hello ");*/
				long total=0;
				long[] pre=new long[2*k+1000];

				for(int j=-k*t;j<=k*t;j++)
				{

					total+=dp[j+offset][i];
					pre[j+offset]=total;
					total%=mod;
					dp[j+offset][i]=total;
					if(j-(2*k+1)+offset>=0)
					{
						dp[j+offset][i]-=pre[j-(2*k+1)+offset];
						dp[j+offset][i]%=mod;
						if(dp[j+offset][i]<0)
						{
							dp[j+offset][i]+=mod;
						}
					}

				}

		}
		long[] presum=new long[2*k+1001];
		presum[0]=dp[0][t];
		for(int i=1;i<=2*k*t;i++)
		{
			presum[i]+=presum[i-1]+dp[i][t];
			presum[i]%=mod;
		}
		long ans=0;
		/*for(int i=-k*t;i<=k*t;i++)
		{
			System.out.println(dp[i+offset][t]+" for "+i);
		}*/
		/*int ans2=0;
		for(int i=-k*t;i<=k*t;i++)
		{
			for(int j=-k*t;j<=k*t;j++)
			{
				if(a+i>b+j)
				{
					ans2+=(dp[i+offset][t]*dp[j+offset][t]);
				}
			}
		}
		System.out.println("ans2 is "+ans2);*/
		for(int i=-k*t;i<=k*t;i++)
		{

		int l=-k*t;
		int r=k*t;
		if(a+i<=b+l)
		{
			continue;
		}
		int mid=-1;
		while(l<=r)
		{
			int mm=(l+r)>>1;
			if(l==r || r==l+1)
			{
				if(a+i>b+r)
				{
					mid=r;
					break;
				}
				mid=l;
				break;
			}
			if(a+i>b+mm)
			{
				l=mm;
			}
			else
			{
				r=mm;
			}

		}
		//System.out.println("mid is "+mid+"  for "+i);
		//System.out.println("presum mid is "+presum[mid+offset]+" dp is "+dp[i+offset][t]);
		long tt=presum[mid+offset]*dp[i+offset][t];
		tt%=mod;
		ans+=tt;
		ans%=mod;
		}
		System.out.println(ans%mod);

		pw.close();
	}
	public static int[] readint(InputReader in,int n)
	{
		int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
		}
		return a;
	}
	public static long[] readlong(InputReader in,int n)
	{
		long[] a=new long[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextLong();
		}
		return a;
	}
	public static void addhm(HashMap<Integer,Integer> hm,int k)
	{
		int cc=0;
		if(hm.containsKey(k))
		{
			cc=hm.get(k);
		}
		hm.put(k, cc+1);
	}
	public static void removehm(HashMap<Integer,Integer> hm,int k)
	{
		int cc=hm.get(k);
		if(cc==1)
		{
			hm.remove(k);
		}
		else
		{
			hm.put(k,cc-1);
		}
	}

	static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Practice {

	static class length implements Comparator<String>
	{
		public int compare(String a,String b)
		{
			return(a.length()-b.length());
		}
	}

	   static class FastReader
	   {
		   BufferedReader br;
		   StringTokenizer st;
		   public FastReader()
		   {
			   br = new BufferedReader(new InputStreamReader(System.in));
		   }

		   String next()
	        {
	            while (st == null || !st.hasMoreElements())
	            {
	                try
	                {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException  e)
	                {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();
	        }

		   int nextInt()
		   {
			   return Integer.parseInt(next());
		   }
		   long nextLong()
		   {
			   return Long.parseLong(next());
		   }
		   double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }

		   String nextLine()
	        {
	            String str = "";
	            try
	            {
	                str = br.readLine();
	            }
	            catch (IOException e)
	            {
	                e.printStackTrace();
	            }
	            return str;
	        }
	   }

		public static void main(String []args) throws Exception
		{
			//Scanner sc=new Scanner(System.in);
			FastReader in =new FastReader();
			PrintWriter pw = new PrintWriter(System.out);
			//System.out.println
			//int n=in.nextInt();

			int n=in.nextInt();
			int l=in.nextInt();
			int r=in.nextInt();
			int min=n-(l-1);
			int i=1;
			while(i<=(l-1))
			{
				min=min+(int)Math.pow(2, i);
				i++;
			}
			i=0;
			int max=0;
			int max1=0,k=0;
			while(i!=r)
			{
				max1=(int)Math.pow(2,i);
				max=max+max1;
				i++;
				k++;

				//pw.println(max+" "+max1);
			}
			max=max+max1*(n-k);
			//pw.println(max);
			pw.print(min+" "+max);


import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class C51B {
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    //BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    //String str=br.readLine();
    //StringTokenizer str=new StringTokenizer();
    String str=sc.nextLine();
    String st2[]=(sc.nextLine()).split(" ");

    String str2[]=str.split(" ");
    long n[]=new long[str2.length];
    for(int i=0;i<n.length;i++){
        n[i]=Long.parseLong(str2[i]);
    }

    int mul=0;
    int ad=0;
    for(int i=0;i<st2.length;i++){
        if(st2[i].equals("*"))
            mul++;
        else
            ad++;
    }

    long res=0;

    for(int i=0;i<mul;i++){
        res=0;
        Arrays.sort(n);
        res+=n[0]*n[1];
        n[1]=res;
        n[0]=1000000000;

    }

    res=0;
    Arrays.sort(n);
    for(int i=0;i<=ad;i++){
        res+=n[i];
    }

        System.out.println(res);

    }//main
}//class


import java.util.*;
public class Main {

    public static void main(String[] args) {\
        Scanner ob= new Scanner(System.in);
        int x1=ob.nextInt();
        int y1=ob.nextInt();
        int x2=ob.nextInt();
        int y2=ob.nextInt();
        int x=ob.nextInt();
        int y=ob.nextInt();

        if(Math.abs((x2-x1)%x)==0 && Math.abs((y2-y1)%y)==0 && Math.abs((x1-x2)/x+(y1-y2)/y)%2==0)
        {
            System.out.println("Yes");
        }
        else
        {
            System.out.println("No");
        }

    }
}


import java.util.* ;
import java.io.* ;

public class MaximumSubsequence
{
	static long pow(long n,long p)
	{
		long  result = 1;
		if(p==0)
		   return 1;
		if (p==1)
		    return n;
		while(p!=0)
		{
		    if(p%2==1)
		        result *= n;
		    p >>=1;
		    n*=n;
		}
		return result;
	}
	static HashSet<Integer> setChecker(int[] A,int m)
	{
		// boolean[] M = new boolean[m] ;
		HashSet<Integer> H = new HashSet<Integer>() ;
		int set_size = A.length ;
		int power_set_size = (int)pow(2,set_size) ;
		for(int i=0;i<power_set_size;i++)
		{
			int sum = 0 ;
			for(int j=0;j<set_size;j++)
			{
				if((i & (1<<j))!=0)
					sum = sum + A[j] ;
			}
			H.add((sum%m)) ;
		}
		return H ;
	}
	static void arrayPrinter(int[] A)
	{
		for(int i=0;i<A.length;i++)
		{
			System.out.print(A[i]+" ") ;
		}
		System.out.println() ;
	}
	static int maxPossibleValue(int[] A,int m)
	{
		if(m==1)
			return 0 ;
		int half_length = A.length/2 ;
		int[] first_half = new int[half_length] ;
		int[] second_half  = new int[A.length-half_length] ;

		for(int i=0;i<half_length;i++)
		{
			first_half[i] = A[i] ;
		}
		for(int i=half_length;i<second_half.length+half_length;i++)
		{
			second_half[i-half_length] = A[i] ;
		}
		// System.out.println("first_half") ;
		// arrayPrinter(first_half) ;
		// System.out.println("\nsecond_half") ;
		// arrayPrinter(second_half) ;
		// System.out.println("A:") ;
		// arrayPrinter(A) ;
		HashSet<Integer> H1 = setChecker(first_half,m) ;
		HashSet<Integer> H2  = setChecker(second_half,m) ;
		Integer[] A1 = H1.toArray(new Integer[H1.size()]) ;
		Integer[] A2 = H2.toArray(new Integer[H2.size()]) ;

		// Iterator I1 = H1.iterator() ;
		// Iterator I2 = H2.iterator() ;
		// System.out.println("H1:") ;
		int maxPV = 0 ;
		for(int i=0;i<A1.length;i++)
		{
			for(int j=0;j<A2.length;j++)
			{
				if((A1[i]+A2[j])%m > maxPV)
					maxPV = (A1[i]+A2[j])%m ;
			}
		}
		System.out.println() ;
		// while(I1.hasNext())
		// {
			// int i = I1.next() ;
			// while(I2.hasNext)
			// {
				// int j = I2.next() ;
				// if((i+j)%m>maxPV)
					// maxPV = (i+j)%m ;
			// }
		// }
		// System.out.println(maxPV) ;
		// System.out.println("\nH2:") ;
		// while(I2.hasNext())
		// {
			// System.out.print(I2.next()+" ") ;
		// }
		// for(int i=0;i<M1.length;i++)
		// {
			// if(M1[i])
				// System.out.println(i) ;
		// }
		// System.out.println() ;
		// for(int i=0;i<M2.length;i++)
		// {
			// if(M2[i])
				// System.out.println(i) ;
		// }
		// System.out.println() ;

		// for(int i=0;i<m;i++)
		// {
			// if(M1[i])
			// {
				// for(int j=0;j<m;j++)
				// {
					// if(M2[j])
					// {
						// if((i+j)%m>maxPV)
							// maxPV = (i+j)%m ;
					// }
				// }
			// }
		// }

		return maxPV ;
	}
	public static void main(String args[]) throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ;
		String line1 = br.readLine() ;
		String line2 = br.readLine() ;
		int size = Integer.parseInt(line1.split(" ")[0]) ;
		int m = Integer.parseInt(line1.split(" ")[1]) ;
		int[] A = new int[size] ;
		for(int i=0;i<size;i++)
		{
			A[i] = Integer.parseInt(line2.split(" ")[i]) ;
		}
		System.out.println(maxPossibleValue(A,m)) ;

	}
}


import java.lang.*;
import java.io.*;
import java.util.*;
public class here
{
    public static void main(String args[])throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int n,i,j,l,k,t;
        StringBuilder sb=new StringBuilder("");
        String s=br.readLine();
        t=Integer.parseInt(s);
        s=br.readLine();
        char[] a=s.toCharArray();
        j=0;
        for(i=0;i<t;)
        {
            if((i+j)<t)
            i=i+j;
            {System.out.print(a[i]);
            if(i==0)
            j=2;
            else
            j++;
            }
            else
            break;
        }
        System.out.println(sb);
    }
}


import java.util.*;

/**
 *
 * @author greggy
 */
public class SerejaAndMugs {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int s = in.nextInt();
        int[] mugs = new int[n];

        for (int i = 0; i < n; i++) {
            mugs[i] = in.nextInt();
        }

        Arrays.sort(mugs);
        int ans = 0;
        for (int i = 0; i < n - 1; i++) {
            ans += mugs[i];
        }

        if (ans <= s) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }


import java.util.*;
import java.io.*;
import java.math.BigInteger;

// you can compare with output.txt and expected out
public class Round791F {
	MyPrintWriter out;
	MyScanner in;

//	final static long FIXED_RANDOM;
//	static {
//		FIXED_RANDOM = System.currentTimeMillis();
//	}
	final static String IMPOSSIBLE = "IMPOSSIBLE";
	final static String POSSIBLE = "POSSIBLE";
	final static String YES = "YES";
	final static String NO = "NO";
	final static long MOD = 998244353;

    private void initIO(boolean isFileIO) {
        if (System.getProperty("ONLINE_JUDGE") == null && isFileIO) {
        	try{
	            in = new MyScanner(new FileInputStream("input.txt"));
	            out = new MyPrintWriter(new FileOutputStream("output.txt"));
        	}
        	catch(FileNotFoundException e){
        		e.printStackTrace();
        	}
        }
        else{
    		in = new MyScanner(System.in);
    	    out = new MyPrintWriter(new BufferedOutputStream(System.out));
        }
    }

	public static void main(String[] args){
//		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

		Round791F sol = new Round791F();
		sol.run();
    }

	private void run() {
		boolean isDebug = false;
		boolean isFileIO = true;
		boolean hasMultipleTests = false;

		initIO(isFileIO);

		int t = hasMultipleTests? in.nextInt() : 1;

	    for (int i = 1; i <= t; ++i) {
	    	int n = in.nextInt();
	    	int m = in.nextInt();
	    	int[][] uv = in.nextPairs(m);
	    	int[] u = uv[0];
	    	int[] v = uv[1];

	    	if(isDebug){
		    	out.printf("Test %d\n", i);
	    	}

			long ans = solve2(u, v, n);
			out.println(ans);

			//validate(u, v, n);

			if(isDebug)
				out.flush();
	    }

	    in.close();
	    out.close();
	}

	// wrong idea for the validator.. meh
	private void validate(int[] u, int[] v, int n) {
		TreeSet<String> set = new TreeSet<>();
		int[][] cmp = new int[RADIX][RADIX];
		for(int i=0; i<RADIX; i++) {
			for(int j=0; j<RADIX; j++) {
				cmp[i][j] = 0;
			}
		}
		for(int i=0; i<u.length; i++) {
			int small = Math.min(u[i], v[i]);
			int large = Math.max(u[i], v[i]);
			cmp[small][large] = -1;
			cmp[large][small] = 1;
		}
//		for(int i=0; i<RADIX; i++) {
//			for(int j=0; j<RADIX; j++) {
//				for(int k=0; k<RADIX; k++) {
//					if(cmp[i][j] == 1 && cmp[j][k] == 1)
//						cmp[i][k] = 1;
//					else if(cmp[i][j] == -1 && cmp[j][k] == -1)
//						cmp[i][k] = -1;
//				}
//			}
//		}

		Comparator<Character> comp = new Comparator<Character>() {
			@Override
			public int compare(Character o1, Character o2) {
				return cmp[o1-'0'][o2-'0'];
			}
		};

		BigInteger curr = BigInteger.ZERO;
		BigInteger limit = BigInteger.valueOf(RADIX).pow(n);
		StringBuilder sb = new StringBuilder();
		while(curr.compareTo(limit) < 0) {
			String s = curr.toString(RADIX);
			int padding = n-s.length();
			sb.setLength(0);
			for(int i=0; i<padding; i++)
				sb.append('0');
			sb.append(s);
			Character[] arr = new Character[n];
			for(int i=0; i<n; i++)
				arr[i] = sb.charAt(i);
			 Arrays.sort(arr, comp);
			// can't use sorting since comp is not transitive
			// actually, should make transitive

//			char[] arr = new char[n];
//			for(int i=0; i<n; i++)
//				arr[i] = sb.charAt(i);
//
//			for(int i=n-1; i>=0; i--) {
//				for(int j=0; j<i; j++) {
//					if(cmp[arr[j]-'0'][arr[j+1]-'0'] == 1) {
//						char temp = arr[j+1];
//						arr[j+1] = arr[j];
//						arr[j] = temp;
//					}
//				}
//			}

			sb.setLength(0);
//			sb.append(arr);
			for(int i=0; i<n; i++)
				sb.append(arr[i]);
			set.add(sb.toString());
			curr = curr.add(BigInteger.ONE);
		}
		out.println(set.size());
		out.println(set);

		// 4 3
		// 0 1
		// 0 2
		// 2 3

		// 0302 -> 0320 -> 0230

        // [0000, 0001, 0002, 0003, 0011, 0012, 0013, 0021, 0022, 0023, 0030, 0031, 0033,
		// 0111, 0112, 0113, 0121, 0122, 0123, 0130, 0131, 0133,
		// 0211, 0212, 0213, 0221, 0222, 0223, 0230, 0231, 0233,
		// 0300, 0301, 0302, 0303, 0311, 0312, 0313, 0330, 0331, 0333,
		// 1111, 1112, 1113, 1121, 1122, 1123, 1130, 1131, 1133, 1211,
		// 1212, 1213, 1221, 1222, 1223, 1230, 1231, 1233,
		// 1300, 1301, 1302, 1303, 1311, 1312, 1313, 1330, 1331, 1333,
		// 2111, 2112, 2113, 2121, 2122, 2123, 2130, 2131, 2133,
		// 2211, 2212, 2213, 2221, 2222, 2223, 2230, 2231, 2233,
		// 2300, 2301, 2302, 2303, 2311, 2312, 2313, 2330, 2331, 2333,
		// 3000, 3001, 3002, 3003, 3011, 3012, 3013, 3021, 3022, 3023, 3030, 3031, 3033,
		// 3111, 3112, 3113, 3121, 3122, 3123, 3130, 3131, 3133,
		// 3300, 3301, 3302, 3303, 3311, 3312, 3313, 3330, 3331, 3333]

		// when inserting j
		// X +
	}

	final int RADIX = 10;
	private long solve2(int[] u, int[] v, int n) {
		// dp[i][set] = a[n-i..n-1] where elements in the set can move forward
		long[][] dp = new long[n][1<<RADIX];

		for(int j=0; j<RADIX; j++) {
			dp[n-1][1<<j] = 1;
		}

		int[][] cmp = new int[RADIX][RADIX];
		int m = u.length;
		for(int i=0; i<m; i++) {
			int small = Math.min(u[i], v[i]);
			int larger = Math.max(u[i], v[i]);
			cmp[small][larger] = -1;
			cmp[larger][small] = 1;
		}

		boolean[][] isValid = new boolean[1<<RADIX][RADIX];
		int[][] map = new int[1<<RADIX][RADIX];

		for(int mask=0; mask< 1<<RADIX; mask++) {
			for(int j=0; j<RADIX; j++) {
				boolean ok = true;
				int next = 1<<j;
				for(int k=0; k<RADIX; k++) {
					if( (1<<k & mask) == 0)
						continue;
					// k can come forward
					// case 1: j is incomparable to k
					// -> remove k from the set
					if(cmp[j][k] == 0) {
					}
					// case 2: j, k can be swapped and j is smaller
					else if(cmp[j][k] == -1) {
						next |= 1<<k;
					}
					// case 3: j, k can be swapped and j is larger -> not a representative
					else {
						ok = false;
					}
				}
				isValid[mask][j] = ok;
				map[mask][j] = next;
			}
		}

		// n*2^RADIX*RADIX = 5*10^4*10^3*10 = 5*10^8
		for(int i=n-2; i>=0; i--) {
			for(int mask=0; mask < 1<<RADIX; mask++) {
				for(int j=0; j<RADIX; j++) {
					if(!isValid[mask][j])
						continue;
					int mask2 = map[mask][j];
					long val = dp[i][mask2] + dp[i+1][mask];
					dp[i][mask2] = val < MOD? val: val-MOD;
				}
			}
		}

		long sum = 0;
		for(int mask=0; mask < 1<<RADIX; mask++)
			sum += dp[0][mask]; // < Integer.MAX_VALUE * 10^3
		return sum%MOD;
	}

	private long solve(int[] u, int[] v, int n) {
		int m = u.length;
		// S = [0, 10^n]
		// find # of equivalance classes S/~
		// base: swap uj and vj if they are adjacent digits

		// 10^n
		// (0, 1)

		// num[i] = # nums ending in i
		long[] num = new long[RADIX];
		for(int i=0; i<RADIX; i++)
			num[i] = 1;

		// multipliers[i][j] = contributions from num[i] when j is appended
		long[][] multipliers = new long[RADIX][RADIX];
		for(int i=0; i<RADIX; i++) {
			for(int j=0; j<RADIX; j++) {
				multipliers[i][j] = 1;
			}
		}

		for(int i=0; i<m; i++) {
			int min = Math.min(u[i], v[i]);
			int max = Math.max(u[i], v[i]);
			multipliers[max][min] = 0;
		}

		// xxxx0 + 1 -> xxxx01 * (1/2) + xxxx10 * (1/2)
		// yyyy1

		// (1/2) + (1/2) = 1
		// 2* + 2* = 1

		// string made of (0, 1)
		// -> different iff it has diff # of 0 or diff # of 1

		// (0, 1) (1, 2)
		// 0000000022222222
		// 0 and 2 can't swap
		// 021

		// xxxx0 + 0 -> k
		// xxxx0 + 1 -> k

		// xxxx1 + 0 -> X
		//

		int temp  =1;

		for(int i=1; i<n; i++) {
			long[] num2 = new long[RADIX];
			for(int j=0; j<RADIX; j++) {
				for(int k=0; k<RADIX; k++) {
					num2[j] += num[k]*multipliers[j][k] % MOD;
				}
				num2[j] %= MOD;
			}
			num = num2;
		}

		long sum = 0;
		for(int i=0; i<RADIX; i++)
			sum += num[i];

		return sum%MOD;
	}

	static long pow(int a, int k, long p) {
		long m = k;
		long ans = 1;

		// curr = k^(2^i)
		long curr = a;

		// k^(2x+1) = (k^x)^2 * k
		while(m > 0) {
			if( (m&1) == 1 ) {
				ans *= curr;
				ans %= p;
			}
			m >>= 1;
			curr *= curr;
			curr %= p;
		}
		return ans;
	}

	// computes a^(p-2)
	static long inverse(int a, long p) {
		return pow(a, (int)(p-2), p);
	}

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		// 32768?
		public MyScanner(InputStream is, int bufferSize) {
			br = new BufferedReader(new InputStreamReader(is), bufferSize);
		}

		public MyScanner(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			// br = new BufferedReader(new InputStreamReader(System.in));
			// br = new BufferedReader(new InputStreamReader(new FileInputStream("input.txt")));
		}

		public void close() {
			try {
				br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}

		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine(){
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		int[][] nextTreeEdges(int n, int offset){
			int[][] e = new int[n-1][2];
			for(int i=0; i<n-1; i++){
				e[i][0] = nextInt()+offset;
				e[i][1] = nextInt()+offset;
			}
			return e;
		}

		int[][] nextMatrix(int n, int m) {
			return nextMatrix(n, m, 0);
		}

		int[][] nextMatrix(int n, int m, int offset) {
			int[][] mat = new int[n][m];
			for(int i=0; i<n; i++) {
				for(int j=0; j<m; j++) {
					mat[i][j] = nextInt()+offset;
				}
			}
			return mat;
		}

		int[][] nextPairs(int n){
			return nextPairs(n, 0);
		}

		int[][] nextPairs(int n, int offset) {
			int[][] xy = new int[2][n];
			for(int i=0; i<n; i++) {
				xy[0][i] = nextInt() + offset;
				xy[1][i] = nextInt() + offset;
			}
			return xy;
		}

		int[][] nextGraphEdges(){
			return nextGraphEdges(0);
		}

		int[][] nextGraphEdges(int offset) {
			int m = nextInt();
			int[][] e = new int[m][2];
			for(int i=0; i<m; i++){
				e[i][0] = nextInt()+offset;
				e[i][1] = nextInt()+offset;
			}
			return e;
		}

		int[] nextIntArray(int len) {
			return nextIntArray(len, 0);
		}
		int[] nextIntArray(int len, int offset){
	    	int[] a = new int[len];
			for(int j=0; j<len; j++)
	    		a[j] = nextInt()+offset;
	    	return a;
		}

		long[] nextLongArray(int len) {
			return nextLongArray(len, 0);
		}
		long[] nextLongArray(int len, int offset){
	    	long[] a = new long[len];
			for(int j=0; j<len; j++)
	    		a[j] = nextLong()+offset;
	    	return a;
		}
	}

	public static class MyPrintWriter extends PrintWriter{
		public MyPrintWriter(OutputStream os) {
			super(os);
		}

		public void printlnAns(boolean ans) {
			if(ans)
				println(YES);
			else
				println(NO);
		}

		public void printAns(long[] arr){
			if(arr != null && arr.length > 0){
				print(arr[0]);
				for(int i=1; i<arr.length; i++){
					print(" ");
					print(arr[i]);
				}
			}
		}
		public void printlnAns(long[] arr){
			printAns(arr);
			println();
		}

		public void printAns(int[] arr){
			if(arr != null && arr.length > 0){
				print(arr[0]);
				for(int i=1; i<arr.length; i++){
					print(" ");
					print(arr[i]);
				}
			}
		}
		public void printlnAns(int[] arr){
			printAns(arr);
			println();
		}

		public <T> void printAns(ArrayList<T> arr){
			if(arr != null && arr.size() > 0){
				print(arr.get(0));
				for(int i=1; i<arr.size(); i++){
					print(" ");
					print(arr.get(i));
				}
			}
		}
		public <T> void printlnAns(ArrayList<T> arr){
			printAns(arr);
			println();
		}

		public void printAns(int[] arr, int add){
			if(arr != null && arr.length > 0){
				print(arr[0]+add);
				for(int i=1; i<arr.length; i++){
					print(" ");
					print(arr[i]+add);
				}
			}
		}
		public void printlnAns(int[] arr, int add){
			printAns(arr, add);
			println();
		}

		public void printAns(ArrayList<Integer> arr, int add) {
			if(arr != null && arr.size() > 0){
				print(arr.get(0)+add);
				for(int i=1; i<arr.size(); i++){
					print(" ");
					print(arr.get(i)+add);
				}
			}
		}

		public void printlnAns(ArrayList<Integer> arr, int add){
			printAns(arr, add);
			println();
		}

		public void printlnAnsSplit(long[] arr, int split){
			if(arr != null){
				for(int i=0; i<arr.length; i+=split){
					print(arr[i]);
					for(int j=i+1; j<i+split; j++){
						print(" ");
						print(arr[j]);
					}
					println();
				}
			}
		}

		public void printlnAnsSplit(int[] arr, int split){
			if(arr != null){
				for(int i=0; i<arr.length; i+=split){
					print(arr[i]);
					for(int j=i+1; j<i+split; j++){
						print(" ");
						print(arr[j]);
					}
					println();
				}
			}
		}

		public <T> void printlnAnsSplit(ArrayList<T> arr, int split){
			if(arr != null && !arr.isEmpty()){
				for(int i=0; i<arr.size(); i+=split){
					print(arr.get(i));
					for(int j=i+1; j<i+split; j++){
						print(" ");
						print(arr.get(j));
					}
					println();
				}
			}
		}
	}

	static private void permutateAndSort(int[] a) {
		int n = a.length;
		Random R = new Random(System.currentTimeMillis());
		for(int i=0; i<n; i++) {
			int t = R.nextInt(n-i);
			int temp = a[n-1-i];
			a[n-1-i] = a[t];
			a[t] = temp;
		}
		Arrays.sort(a);
	}

	static private int[][] constructChildren(int n, int[] parent, int parentRoot){
		int[][] childrens = new int[n][];

		int[] numChildren = new int[n];
		for(int i=0; i<parent.length; i++) {
			if(parent[i] != parentRoot)
				numChildren[parent[i]]++;
		}

		for(int i=0; i<n; i++) {
			childrens[i] = new int[numChildren[i]];
		}

		int[] idx = new int[n];
		for(int i=0; i<parent.length; i++) {
			if(parent[i] != parentRoot)
				childrens[parent[i]][idx[parent[i]]++] = i;
		}

		return childrens;
	}

	static private int[][][] constructDirectedNeighborhood(int n, int[][] e){
		int[] inDegree = new int[n];
		int[] outDegree = new int[n];
		for(int i=0; i<e.length; i++) {
			int u = e[i][0];
			int v = e[i][1];
			outDegree[u]++;
			inDegree[v]++;
		}

		int[][] inNeighbors = new int[n][];
		int[][] outNeighbors = new int[n][];
		for(int i=0; i<n; i++) {
			inNeighbors[i] = new int[inDegree[i]];
			outNeighbors[i] = new int[outDegree[i]];
		}

		int[] inIdx = new int[n];
		int[] outIdx = new int[n];
		for(int i=0; i<e.length; i++) {
			int u = e[i][0];
			int v = e[i][1];
			outNeighbors[u][outIdx[u]++] = v;
			inNeighbors[v][inIdx[v]++] = u;
		}

		return new int[][][] {inNeighbors, outNeighbors};
	}

	static private int[][] constructNeighborhood(int n, int[][] e) {
		int[] degree = new int[n];
		for(int i=0; i<e.length; i++) {
			int u = e[i][0];
			int v = e[i][1];
			degree[u]++;
			degree[v]++;
		}

		int[][] neighbors = new int[n][];
		for(int i=0; i<n; i++)
			neighbors[i] = new int[degree[i]];

		int[] idx = new int[n];
		for(int i=0; i<e.length; i++) {
			int u = e[i][0];
			int v = e[i][1];
			neighbors[u][idx[u]++] = v;
			neighbors[v][idx[v]++] = u;
		}

		return neighbors;
	}

	static private void makeDotUndirected(int[][] e) {
		MyPrintWriter out2 = null;
		 try {
			out2 = new MyPrintWriter(new FileOutputStream("graph.dot"));
		} catch (FileNotFoundException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		out2.println("strict graph {");
		for(int i=0; i<e.length; i++){
			out2.println(e[i][0] + "--" + e[i][1] + ";");
		}
		out2.println("}");
		out2.close();
	}

	static private void makeDotDirected(int[][] e) {
		MyPrintWriter out2 = null;
		 try {
			out2 = new MyPrintWriter(new FileOutputStream("graph.dot"));
		} catch (FileNotFoundException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		out2.println("strict digraph {");
		for(int i=0; i<e.length; i++){
			out2.println(e[i][0] + "->" + e[i][1] + ";");
		}
		out2.println("}");
		out2.close();
	}

}


import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class Solution extends PrintWriter {

	void run() {

		int n = nextInt(), m = 5;

		long[][] dp = new long[m + 1][n + 1];

		for (int i = 0; i <= n; i++) {
			dp[0][i] = 1;
		}

		for (int i = 0; i <= n; i++) {
			dp[1][i] = i * i;
		}

		for (int s = 2; s <= m; s++) {
			for (int i = 1; i <= n; i++) {
				dp[s][i] = i * dp[s - 1][i - 1];
			}
		}

		println(dp[m][n]);

	}

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

	long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	int[][] nextMatrix(int n, int m) {
		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				matrix[i][j] = nextInt();
		return matrix;
	}

	String next() {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(nextLine());
		return tokenizer.nextToken();
	}

	boolean hasNext() {
		while (!tokenizer.hasMoreTokens()) {
			String line = nextLine();
			if (line == null) {
				return false;
			}
			tokenizer = new StringTokenizer(line);
		}
		return true;
	}

	int[] nextArray(int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = nextInt();
		}
		return array;
	}

	int nextInt() {
		return Integer.parseInt(next());
	}

	long nextLong() {
		return Long.parseLong(next());
	}

	double nextDouble() {
		return Double.parseDouble(next());
	}

	String nextLine() {
		try {
			return reader.readLine();
		} catch (IOException err) {
			return null;
		}
	}

	public Solution(OutputStream outputStream) {
		super(outputStream);
	}

	static BufferedReader reader;
	static StringTokenizer tokenizer = new StringTokenizer("");
	static Random rnd = new Random();

	public static void main(String[] args) throws IOException {
		Solution solution = new Solution(System.out);
		reader = new BufferedReader(new InputStreamReader(System.in));
		solution.run();
		solution.close();
		reader.close();
	}
}


//package marbles;

import java.util.Random;
import java.util.Scanner;

/**
 *
 * @author Adreno
 */
public class Marbles {

    public static char reverse(char c) {
        if (c == 'N') return 'S';
        if (c == 'S') return 'N';
        if (c == 'W') return 'E';
        if (c == 'E') return 'W';
        return '-';
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        scanner.nextLine();
        String a = "-" + scanner.nextLine() + "-";
        String b = "-" + scanner.nextLine() + "-";
        long[] hajA = new long[n];
        long modA = 192389845L; // liittyy molempiin
        long modB = 219386759L; // liittyy molempiin
        long hajValA = 0;
        for (int i=0; i<n; i++) {
            modA *= modA;
            hajValA += a.charAt(n-i-1) * modA;
            hajValA %= modB;
            hajA[i] = hajValA;
        }

        modA = 192389845L;
        long hajValB = 0;
        for (int i=0; i<n; i++) {
            char lisattava = reverse(b.charAt(n-i-1));
            modA *= modA;
            hajValB += lisattava * modA;
            hajValB %= modB;
            if (hajValB == hajA[i]) {
                System.out.println("NO");
                return;
            }
        }
        System.out.println("YES");
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.*;

import october.stackusinglinkedlist;

public class workspace {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		int a = in.readInt();
		int b = in.readInt();
		StringBuilder s = new StringBuilder("");
		int count = 0;

		Stack<Integer> stack = new Stack<>();
		boolean bool = true;
		while (b >= a) {
			if (b==a){
				bool = false;
			}
			stack.add(b);
			if (b % 2 == 0) {
				b = b / 2;
			} else {
				b = b / 10;
			}
				count++;
		}

		if (!bool) {
			System.out.println("YES");
			System.out.println(count);

			while (!stack.isEmpty()) {
				System.out.print(stack.pop() + " ");
			}
		} else {
			System.out.println("NO");
		}
	}

	private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			long sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuffer res = new StringBuffer();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}
	}

	private static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(outputStream);
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}
	}

}


import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Comparator;

public class Solution {

    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    public static void solve(InputStream inputStream, PrintStream outputStream) throws Exception {
        StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(inputStream)));
//		BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(outputStream));

        int n = readInteger(in);
        final int[] a = new int[n];
        int[] prev = new int[n];
        int[] next = new int[n];
        Integer[] b = new Integer[n];
        for (int i = 0; i < n; i++) {
            a[i] = readInteger(in);
            b[i] = i;
            prev[i] = i - 1;
            next[i] = i + 1;
        }

        Arrays.sort(b, (i, j) -> Integer.compare(a[i], a[j]));

        int h = 0;
        int sum = 0;
        for (int i = 0; i < n - 2; i++) {
            sum += (a[b[i]] - h) * (n - i - 2);
            h = a[b[i]];
            if (prev[b[i]] >= 0 && next[b[i]] < n) {
                sum += Math.min(a[prev[b[i]]], a[next[b[i]]]) - h;
            }
            if (prev[b[i]] >= 0) {
                next[prev[b[i]]] = next[b[i]];
            }
            if (next[b[i]] < n) {
                prev[next[b[i]]] = prev[b[i]];
            }
        }

        out.println(sum);
        out.flush();
    }

    private static double readDouble(StreamTokenizer in) throws Exception { in.nextToken(); return in.nval; }
    private static int readInteger(StreamTokenizer in) throws Exception { return (int) readDouble(in); }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        D solver = new D();
        solver.solve(1, in, out);
        out.close();
    }

    static class D {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            long n = in.nl();
            int k = in.ni();
            long[] divs = new long[100];
            int dn = 0;
            int[] divCnt = new int[100];
            long orig = n;
            for (long d = 2; d * d <= n; d++) {
                if (n % d == 0) {
                    divs[dn++] = d;
                    while (n % d == 0) {
                        divCnt[dn - 1]++;
                        n /= d;
                    }
                }
            }
            if (n != 1) {
                divs[dn++] = n;
                divCnt[dn - 1] = 1;
            }
            n = orig;
            int maxCnt = 0;
            for (int i = 0; i < dn; i++) {
                maxCnt = Math.max(maxCnt, divCnt[i]);
            }
            long[] inv = new long[maxCnt + 2];
            inv[1] = 1;
            long mod = 1000_000_007;
            BigInteger MOD = BigInteger.valueOf(mod);
            BigInteger M2 = MOD.subtract(BigInteger.valueOf(2));
            for (int i = 2; i <= maxCnt + 1; i++) {
                inv[i] = BigInteger.valueOf(i).modPow(M2, MOD).longValue();
            }
            //System.out.println(Arrays.toString(inv));
            long ans = 1;
            for (int i = 0; i < dn; i++) {
                int cnt = divCnt[i] + 1;
                long div = divs[i];
                long[][] dp = new long[k + 1][cnt + 1];
                dp[0][cnt] = 1;
                for (int j = 1; j <= k; j++) {
                    long sum = 0;
                    for (int cn = cnt; cn > 0; cn--) {
                        sum += dp[j - 1][cn] * inv[cn];
                        sum %= mod;
                        dp[j][cn] = sum;
                    }
                }
                long pow = 1;
                long e = 0;
                for (int j = 1; j <= cnt; j++) {
                    e += pow * dp[k][j];
                    e %= mod;
                    pow *= div;
                    pow %= mod;
                }
                //System.out.println("e = " + e);
                ans *= e;
                ans %= mod;
            }
            out.println(ans);
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

        public long nl() {
            return Long.parseLong(ns());
        }

    }
}


import java.util.Scanner;

public class exams {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int k = scn.nextInt();
		boolean dp[][] = new boolean[n + 1][k + 1];
		int ans[][] = new int[n + 1][k + 1];
		for (int i = 0; i <= n; i++) {
			for (int j = 0; j <= k; j++) {
				ans[i][j] = Integer.MAX_VALUE;
			}
		}
		dp[0][0] = true;
		ans[0][0] = 0;
		for (int i = 1; i <= n; i++) {
			for (int j = 2; j <= k; j++) {
				int count = 0;
				if (j - 2 >= 0 && dp[i - 1][j - 2]) {
					dp[i][j] = true;
					count = ans[i - 1][j - 2];
					ans[i][j] = Math.min(ans[i][j], count + 1);
				}
				if (j - 3 >= 0 && dp[i - 1][j - 3]) {
					dp[i][j] = true;
					count = ans[i - 1][j - 3];
					ans[i][j] = Math.min(ans[i][j], count);
				}
				if (j - 4 >= 0 && dp[i - 1][j - 4]) {
					dp[i][j] = true;
					count = ans[i - 1][j - 4];
					ans[i][j] = Math.min(ans[i][j], count);
				}
				if (j - 5 >= 0 && dp[i - 1][j - 5]) {
					dp[i][j] = true;
					count = ans[i - 1][j - 5];
					ans[i][j] = Math.min(ans[i][j], count);
				}
			}
		}
		System.out.println(ans[n][k]);

	}

	private static void solve(int count, int sum, int k, int n) {
		if (n == 0) {
			if (sum == k) {
				ans = Math.min(ans, count);
			}
			return;
		}
		for (int i = 2; i <= 5; i++) {
			if (i == 2) {
				solve(count + 1, sum + i, k, n - 1);
			} else {
				solve(count, sum + i, k, n - 1);
			}
		}
	}

}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
   public static void main(String[] args){
        InputStream inputStream = System.in;
        InputReader in = new InputReader(inputStream);
        Task solver = new Task(in);
        solver.solve();
    }

    static class Task{
        InputReader in;

        Task(InputReader in){
            this.in=in;
        }

        public void solve(){
            int n=in.nextInt(),k=in.nextInt();
            int min,max;

            if(k==0||n==k){
                min=0;
                max=0;
                System.out.println(min+" "+max);
                return;
            }
            min=1;
            max=minimum(n-k,2*k);

            System.out.println(min+" "+max);
        }

        int minimum(int a,int b){
            if(a<b)
                return a;
            return b;
        }
    }

    static class InputReader {
        private boolean finished = false;

        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int peek() {
            if (numChars == -1) {
                return -1;
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    return -1;
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)){
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do{
                if (c < '0' || c > '9'){
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString(){
            int c = read();
            while (isSpaceChar(c)){
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do{
                if (Character.isValidCodePoint(c){
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c){
            if (filter != null){
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c){
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private String readLine0(){
            StringBuilder buf = new StringBuilder();
            int c = read();
            while (c != '\n' && c != -1){
                if (c != '\r'){
                    buf.appendCodePoint(c);
                }
                c = read();
            }
            return buf.toString();
        }

        public String readLine(){
            String s = readLine0();
            while (s.trim().length() == 0){
                s = readLine0();
            }
            return s;
        }

        public String readLine(boolean ignoreEmptyLines){
            if (ignoreEmptyLines){
                return readLine();
            } else{
                return readLine0();
            }
        }

        public BigInteger readBigInteger(){
            try{
                return new BigInteger(nextString());
            } catch (NumberFormatException e){
                throw new InputMismatchException();
            }
        }

        public char nextCharacter(){
            int c = read();
            while (isSpaceChar(c)){
                c = read();
            }
            return (char) c;
        }

        public double nextDouble(){
            int c = read();
            while (isSpaceChar(c)){
                c = read();
            }
            int sgn = 1;
            if (c == '-'){
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.'){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.'){
                c = read();
                double m = 1;
                while (!isSpaceChar(c)){
                    if (c == 'e' || c == 'E'){
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9'){
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public boolean isExhausted(){
            int value;
            while (isSpaceChar(value = peek()) && value != -1){
                read();
            }
            return value == -1;
        }

        public String next(){
            return nextString();
        }

        public SpaceCharFilter getFilter(){
            return filter;
        }

        public void setFilter(SpaceCharFilter filter){
            this.filter = filter;
        }

        public interface SpaceCharFilter{
            public boolean isSpaceChar(int ch);
        }

        public int[] nextIntArray(int n){
            int[] array=new int[n];
            for(int i=0;i<n;++i)array[i]=nextInt();
            return array;
        }

        public int[] nextSortedIntArray(int n){
            int array[]=nextIntArray(n);
            Arrays.sort(array);
            return array;
        }

        public int[] nextSumIntArray(int n){
            int[] array=new int[n];
            array[0]=nextInt();
            for(int i=1;i<n;++i)array[i]=array[i-1]+nextInt();
            return array;
        }

        public long[] nextLongArray(int n){
            long[] array=new long[n];
            for(int i=0;i<n;++i)array[i]=nextLong();
            return array;
        }

        public long[] nextSumLongArray(int n){
            long[] array=new long[n];
            array[0]=nextInt();
            for(int i=1;i<n;++i)array[i]=array[i-1]+nextInt();
            return array;
        }
        public long[] nextSortedLongArray(int n){
            long array[]=nextLongArray(n);
            Arrays.sort(array);
            return array;
        }
    }
}


import java.io.*;
public class NicholasandPermutation throws IOException{
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine().trim());
		String a[] = br.readLine().trim().split(" ");
		int min, max;
		min = max = Integer.parseInt(a[0]);
		int minI, maxI;
		minI = maxI = 0;
		int arr[] = new int[n];
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(a[i]);
			if(arr[i] < min) {
				minI = i;
				max = arr[i];
			}
			else if(arr[i] > max) {
				maxI = i;
				max = arr[i];
			}
		}

		if(minI > maxI){
			System.out.println(n - maxI - 1);
		}
		else{
			System.out.println(n - minI - 1);
		}
	}
}


public class KN {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();

        int f_dig = number / 10;
        int s_dig = number % 10;

        if (number == 10 || number == 11 || (number >= 13 && number <= 19)) {
            System.out.println("YES");
            System.exit(0);
        }

        if (f_dig == 2 || f_dig == 7 || f_dig == 9) {
            System.out.println("YES");
            System.exit(0);
        }

        if (s_dig == 1 || s_dig == 7 || s_dig == 9) {
            System.out.println("YES");
            System.exit(0);
        }

        System.out.println("NO");
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author darshan
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            long res = 0;
            long tp = n;
            while (n % 2 == 0) {
                n = n / 2;
                res++;
            }
            while (n % 3 == 0) {
                n = n / 3;
                res++;
            }
            for (long i = 5; i * i <= tp; i += 6) {
                while (n % i == 0) {
                    n = n / i;
                    res++;
                }
                while (n % (i + 2) == 0) {
                    n = n / (i + 2);
                    res++;
                }
            }
            if (n > 1) {
                res++

            }
            out.println(res);

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


package cf;

import java.util.*;

public class Cf {

    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt(), m = s.nextInt();
        int t = n % m;

        if (t == 0)
        {
            for (int i = 0; i < m; ++i)
            {
                System.out.format("%d ", n / m);
            }
        }
        else
        {
            for (int i = 0; i < m - t; ++i)
            {
                System.out.format("%d ", n / m);
            }

            for (int i = 0; i < t; ++i)
            {
                System.out.format("%d ", n / m + 1);
            }
        }
    }
}


 import java.util.*;
public class Main{
 public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);

      int a,b,c,n;
      int x=0;
      n=sc.nextInt();
      for ( a = 1; a<= n; a++) {
        for ( b = a; b <= n; b++) {
           for(c=b;c<=n;c++)
              {
            if (a^b^c==0 )
                x++;
        }}}
        System.out.printf(x);
    }
    }


// @author Sanzhar
import java.io.*;
import java.util.*;
import java.awt.Point;

public class Template {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

    String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(in.readLine());
            } catch (Exception e) {
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    public void run() throws Exception {
        //in = new BufferedReader(new FileReader("input.txt"));
        //out = new PrintWriter(new FileWriter("output.txt"));
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.flush();
        out.close();
        in.close();
    }

    public void solve() throws Exception {
        long n = nextLong();
        long mod = 1000000007;
        long ans = 1;
        for (long i = 1; i <= n; i++) {
            if (i == n - 1) {
                continue;
            }
            ans *= i;
            ans %= mod;
        }
        ans = (2 * ans * ans) % mod;
        out.println(ans);
    }

    public static void main(String[] args) throws Exception {
        new Template().run();
    }
}


import java.util.Scanner;

public class B {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;
		System.out.println(num + "/" + den);
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
}


import java.io.*;
import java.util.Locale;
import java.util.StringTokenizer;

public class A implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    double readDouble() {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new A().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    int gcd(int a, int b) {
        return a == 0 ? b : gcd(b % a, a);
    }

    private void solve() {
        int n = readInt();
        int m = readInt();
        int x = readInt();
        int y = readInt();
        int a = readInt();
        int b = readInt();

        int gcd = gcd(a, b);
        a /= gcd;
        b /= gcd;

        int width = 0;
        int height = 0;
        int left = 0, right = n / a;
        while (left <= right) {
            int mid = (left + right) >> 1;
            long curWidth = 1l * a * mid;
            if (curWidth <= n) {
                long curHeight = 1l * mid * b;
                if (curHeight <= m) {
                    width = (int) curWidth;
                    height = (int) curHeight;
                    left = mid + 1;
                } else {
                    right = mid - 1;
                }
            } else {
                right = mid - 1;
            }
        }

        int x1 = x - width / 2 - width % 2;
        if (x1 < 0) {
            x1 = 0;
        }
        if (x1 + width > n) {
            x1 = n - width;
        }

        int y1 = y - height / 2 - height % 2;
        if (y1 < 0) {
            y1 = 0;
        }
        if (y1 + height > m) {
            y1 = m - height;
        }

        int xAns = x1;
        int yAns = y1;
        String answer = xAns + " " + yAns + " " + (xAns + width) + " " + (yAns + height);

        final int delta = 10;
        for (int xx = x1 - delta; xx <= x1 + delta; xx++) {
            for (int yy = y1 - delta; yy <= y1 + delta; yy++) {
                if (xx >= 0 && xx + width <= n && yy >= 0 && yy + height <= m &&
                        xx <= x && x <= xx + width && yy <= y && y <= yy + height) {
                    long distAns = getDistSqr(2 * x, 2 * y, 2 * xAns + width, 2 * yAns + height);
                    long distCur = getDistSqr(2 * x, 2 * y, 2 * xx + width, 2 * yy + height);
                    if (distCur < distAns) {
                        xAns = xx;
                        yAns = yy;
                        answer = xAns + " " + yAns + " " + (xAns + width) + " " + (yAns + height);
                    } else if (distCur == distAns) {
                        String curAnswer = xx + " " + yy + " " + (xx + width) + " " + (yy + height);
                        if (curAnswer.compareTo(answer) < 0) {
                            xAns = xx;
                            yAns = yy;
                            answer = xAns + " " + yAns + " " + (xAns + width) + " " + (yAns + height);
                        }
                    }
                }
            }
        }

        out.println(answer);
    }

    long getDistSqr(int x1, int y1, int x2, int y2) {
        if (x2 < 0 || y2 < 0) {
            System.err.println("hell");
        }
        long dx = x1 - x2;
        long dy = y1 - y2;
        return dx * dx + dy * dy;
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
public class Main {

    public static void main(String[] args) {
    int f,a,t;

    Scanner in = new Scanner(System.in);
    f = in.nextInt();
    a = in.nextInt();
    t = in.nextInt();
    in.nextLine();

    int[] it = new int [a];
    for ( int i = 0; i < a; ++i ) it[i] = 0;

    for ( int i = 0; i < f; ++i ) {
        for ( int j = 0; j < a; ++j ) {
            char c;
            c = in.findInLine(".").charAt(0);
                if ( c == 'Y' ) it[j] +=1;
        }
        if ( i != friends - 1 ) {
            in.nextLine();
        }

    }
    int res = 0;
    for ( int i = 0; i < a; ++i ) {
        if ( it[i] >= t ) res++;
    }

    System.out.println(res+"");

    }

}


import java.util.Scanner;

public class Summer{
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);

        int pos = scan.nextInt();

        String result = "1";
        int num = 2;

        while(result.length < pos){
            result += num;
            num++;
        }

        System.out.println(result.charAt(pos));
    }
}


import java.util.Scanner;

public class Calendar {
    int rows;
    int columns;
    public int getRows() {
        return rows;
    }

    public void setRows() {
        this.rows = 7;
    }

    public int getColumns() {
        return columns;
    }

    public void setColumns(int firstDay, int month) {
        switch (month) {
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12://31 DAYS
                //System.out.println("31 DAYS");
                if (firstDay > 5)
                    this.columns = 6;
                else
                    this.columns = 5;
                break;
            case 4:
            case 6:
            case 9:
            case 11://30 DAYS

                //System.out.println("30 DAYS");
                if (firstDay > 6)
                    this.columns = 6;
                else
                    this.columns = 5;
                break;
            case 2://28 DAYS
                //System.out.println("28 DAYS");
                if (firstDay > 1)
                    this.columns = 5;
                else
                    this.columns = 4;
                break;
            default:
                System.out.println("Invalid month.");
                break;

        }
    }
}

public class Play {
    public static void main(String[] args) {
        int firstDay = 0, month = 0;
        Scanner input = new Scanner(System.in);

        month = input.nextInt();

        if(input.hasNext()) {
            firstDay = input.nextInt();
        }
        Calendar firstTry = new Calendar();
        firstTry.setRows();
        firstTry.setColumns(firstDay,month);
        System.out.println(firstTry.getColumns());
    }
}


import java.io.*;
import java.util.*;

public class BeautifulStrings_336D {

	public final static int mod = 1000000007;

	static long exp (long x, long n)
	{
		x%=mod;
		if (n == 0)
			return 1;
		else if (n == 1)
			return x%mod;
		else if (n%2 == 0)
			return exp(x*x%mod, n/2)%mod;
		else if (n%2 == 1)
			return x*exp(x*x%mod, (n-1)/2)%mod;
		else
			return 1;
	}

	static int ncr (int n, int r)
	{
		long num = 1;
		for (int i = n-r+1; i <= n; i++)
		{
			num *= i;
			num %= mod;
		}
		long denom = 1;
		for (int i = 1; i <= r; i++)
		{
			denom *= i;
			denom %= mod;
		}
		return (int)(num*exp(denom,(long)mod-2)%mod);
	}

	void run() throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//		BufferedReader br = new BufferedReader(new FileReader("336D.in"));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int g = Integer.parseInt(st.nextToken());
		int count = 0;
		if (n == 0 && m == 0)
		{
			System.out.println(count);
			System.exit(0);
		}
		if (n == 0)
		{
			System.out.println(1-g);
			System.exit(0);
		}
		if (m == 0)
		{
			if (n%2 == 0)
			{
				System.out.println(g);
				System.exit(0);
			}
			else
			{
				System.out.println(1-g);
				System.exit(0);
			}
		}
		if (m == 1)
		{
			if (n%2 == 0)
			{
				if (g == 0)
				{
					count--;
				}
				else
				{
					count++;
				}
			}
			else
			{
				if (g == 0)
				{
					count++;
				}
				else
				{
					count--;
				}
			}

		}
		if (g == 0)
			for (int i = 1; i <= n+1; i+=2)
				count += ncr(n+m-i,m-1);
		else
			for (int i = 2; i <= n+1; i+=2)
				count += ncr(n+m-i,m-1);
		System.out.println(count);
		System.exit(0);
	}

	public static void main(String[] args) throws IOException {
		BeautifulStrings_336D prog = new BeautifulStrings_336D();
		prog.run();
	}
}


import java.io.PrintStream;
import java.util.Scanner;
import java.util.ArrayList;

public class JavaApplication1 {

     static PrintStream  p = System.out;
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        char x = sc.next().charAt(0);
        char y = sc.next().charAt(0);
        int k = sc.nextInt();
        ArrayList e =  new ArrayList();
        e.add('v');
        e.add('<');
        e.add('^');
        e.add('>');
        int del = (e.indexOf(y)-e.indexOf(x)+4) % 4;
        if(del==0 || del==4)
            p.print("undefined");
        else if (del == n%4)
            p.print("cw");
        else
            p.print("ccw")
    }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anuj64
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        outputWriter out = new outputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        HashMap<Integer, Long> F;

        public void solve(int testNumber, InputReader in, outputWriter out) throws IOException {
            long n = in.nextLong();
            F = new HashMap<Integer, Long>();
            F.put(0, 1l);
            F.put(1, 1l);
            F.put(2, 2l);
            int high = 90;
            int low = 0, mid = 0;
            while (high > low + 1) {
                mid = (low + high) / 2;
                Long res = f(mid);
                if (res > n) {
                    high = mid;
                } else {
                    low = mid;
                }
                // out.println(mid+" "+res);
            }
            out.println((low - 1));
            //for(int i = 0; i < 100; i++)
            //out.println(i+" "+f(i));
        }

        long f(int n) {
            if (F.containsKey(n)) return F.get(n);
            int k = n / 2;
            if (n % 2 == 0) { // n=2*k
                F.put(n, (f(k) * f(k) + f(k - 1) * f(k - 1)));
            } else { // n=2*k+1
                F.put(n, f(k) * f(k + 1) + f(k - 1) * f(k));
            }
            return F.get(n);
        }

    }

    static class InputReader {
        private byte[] buf = new byte[8000];
        private int index;
        private int total;
        private InputStream in;

        public InputReader(InputStream stream) {
            in = stream;
        }

        public int scan() {
            if (total == -1)
                throw new InputMismatchException();
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (total <= 0)
                    return -1;
            }
            return buf[index++];
        }

        public long nextLong() {
            long integer = 0;
            int n = scan();
            while (isWhiteSpace(n))
                n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                } else
                    throw new InputMismatchException();
            }
            return neg * integer;
        }

        public boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                return true;
            return false;
        }

    }

    static class outputWriter {
        BufferedWriter out;

        public outputWriter() {
            out = new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void println(Object object) throws IOException {
            out.append("" + object + "\n");
        }

        public void close() throws IOException {
            out.close();
        }

    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Solution{
    static double calcDist(int a,int b,int c,int d){
        return Math.sqrt(((c-a)*(c-a)+(d-b)*(d-b)));
    }
    public static void main(String[] args){

    Scanner in = new Scanner(System.in);
    int ax = in.nextInt();
    int ay = in.nextInt();
    int bx = in.nextInt();
    int by = in.nextInt();
    int cx = in.nextInt();
    int cy = in.nextInt();

    double distab = calcDist(ax,ay,bx,by);
    double distbc = calcDist(bx,by,cx,cy);
    double distac = calcDist(ax,ay,cx,cy);
    // float slopeab = (by-ay)/(bx-ax);
    // float slopebc = (cy-by)/(cx-bx);
    //determinant----> |A|=0
    // |ax ay 1|
    // |bx by 1|
    // |cx cy 1|
    if(ax*(by-cy)-ay*(bx-cx)+bx*cy-cx*by==0){
        System.out.println("No";)
    }
    else if(distab!=distbc){System.out.println("No");}

    else if((by-ay)*(cx-bx)==(cy-by)*(bx-ax)){
        System.out.println("No");
    }

    else System.out.println("Yes");

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Arrays;

public class Solution {
    public static void main(String[] args) throws Exception {
        Solution solution = new Solution();
        solution.run();
    }

    private void run() throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String s = in.readLine();

        BigInteger ans = BigInteger.ZERO;

        for (int i = 1; i < 10; i++) {
            boolean[] used = new boolean[26];
            Arrays.fill(used, false);
            BigInteger cur = BigInteger.ONE;

            if (Character.isDigit(s.charAt(0)) && s.charAt(0) != ((char)i + '0')) {
                continue;
            }

            for (int j = 1; j < s.length(); j++) {
                if (s.charAt(j) == '?') {
                    cur = cur.multiply(BigInteger.TEN);
                } else if (Character.isAlphabetic(s.charAt(j)) && s.charAt(j) != s.charAt(0)) {
                    used[(int)s.charAt(j) - 'A'] = true;
                }
            }

            int cnt = 0;
            for (int j = 0; j < 26; j++) {
                if (used[j]) {
                    cnt++;
                }
            }

            //System.err.println(cur + " " + cnt);

            int v = 10;
            if (Character.isAlphabetic(s.charAt(0))) {
                v--;
            }
            for (int j = 0; j < cnt; j++) {
                cur = cur.multiply(BigInteger.valueOf(v - j));
            }

            ans = ans.add(cur);
        }

        System.out.println(ans);

        in.close();
    }
}


import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.Vector;
public class Main {
	static final long mod=1000000007;
	public static void main(String[] args) {
		int a[]=new int[20];
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		long s=sc.nextLong();
		for(int i=0;i<n;i++)
				a[i]=sc.nextInt();
		int len=(1<<n);
		long ans=0;
		for(int i=0;i<len;i++){
			long x=s;
			int flag=1;
			for(int j=0;j<len;j++)
				if(((i>>j)&1)==1){
					flag*=-1;
					x-=a[j]+1;
				}
			if(x<0)
				continue;
			ans=(ans+flag*lucas(x+n-1,n-1))%mod;
			ans=(ans+mod)%mod;
		}
		System.out.println(ans);
	}
	static long lucas(long a,long b){
		if(b==0)
			return 1;
		return getc(a%mod,b%mod)*lucas(a/mod,b/mod)%mod;
	}
	static long getc(long a,long b){
		if(a<b)
			return 0;
		long ans=1;
		for(long i=a-b+1;i<=a;i++)
			ans=ans*i%mod;
		long t=1;
		for(long i=1;i<=b;i++)
			t=t*i%mod;
		return ans*qpow(t,mod-2)%mod;
	}
	static long qpow(long a,long b){
		long ans=1;
		while(b!=0){
			if((b&1)==1){
				ans=a*ans%mod;
			}
			a=a*a%mod;
			b>>=1;
		}
		return ans;
	}
}


import java.io.*;
import java.util.*;

public class Solution {
    public static void main (String args[]) throws FileNotFoundException {
        boolean online = "true".equals(System.getProperty("ONLINE_JUDGE"));
        if (online) {
            in = new Scanner(System.in);
            out = new PrintWriter(System.out);
        }
        else {
            in = new Scanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        }

        new Solution().run();

        out.close();
    }

    private ArrayList<Integer>[] g;
    private byte[] c;

    private void run () {
        int n = in.nextInt();

        g = new ArrayList[n];
        for (int i = 0; i < n; ++i)
            g[i] = new ArrayList<Integer>();

        int m = in.nextInt();
        for (int i = 0; i < m; ++i) {
            int u = in.nextInt()-1,
                v = in.nextInt()-1;
            g[u].add(v);
            g[v].add(u);
        }

        c = new byte[n];
        for (int i = 0; i < n; ++i)
            dfs(i);
        for (int i = 0; i < n; ++i)
            out.print(c[i]);
    }

    private void dfs (int u) {
        int cnt = 0;
        for (int i = 0; i < g[u].size(); ++i)
            if (c[u] == c[g[u].get(i)])
                ++cnt;
        if (cnt > 1) {
            c[u] ^= 1;
            for (int i = 0; i < g[u].size(); ++i) {
                int v = g[u].get(i);
                if (c[u] == c[v])
                    dfs(v);
            }
        }
    }

    private static Scanner in;
    private static PrintWriter out;
}


import java.util.*;

public class Main{
          public static void main(String []args){
                    int n;
                    String s;
                    Scanner sc=new Scanner(System.in);
                    n=sc.nextInt();
                    s=sc.next();
                    char x;
                    String[] qaq={s};
                   StringBuilder sb= new StringBuilder();
                    int set=0;
                    for(int i=0;i<s.length()-1;i++){

                          if(judge(qaq[i])&&set==0){
                                    sb.append(qaq[i]);
                                    set++;
                          }
                          else {
                                    sb.deleteCharAt(i);
                                    set--;
                          }
                    }
                    String ans=sb.toString();
                    System.out.print(ans);
                    return;
          }
          public static boolean judge(char x){
                    if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u') return true;
           return false;
          }
}


import java.util.*;
import java.io.*;
import java.math.*;

public class scorify{
	public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    BigInteger yshards = BigInteger.valueOf(in.nextInt());
    BigInteger bshards = BigInteger.valueOf(in.nextInt());

    int yellow = in.nextInt();
    int green = in.nextInt();
    int blue = in.nextInt();

    BigInteger need =BigInteger.ZERO;
    BigInteger needy = BigInteger.valueOf(2*yellow);
    if(yshards.compareTo(needy)<0){
        need = need.add(need).add(needy).subtract(yshards);
        yshards=BigInteger.ZERO;
    }else{yshards = yshards.subtract(needy);}
    int needb = green;
    needy = BigInteger.valueOf(green);
	if(yshards.compareTo(needy)<0){
	    need = need.add(need).add(needy).subtract(yshards);
	    yshards=BigInteger.ZERO;
	}else{yshards = yshards.subtract(needy);}
	if(bshards.compareTo(needb)<0){
	    need = need.add(need).add(needb).subtract(bshards);
	    bshards=BigInteger.ZERO;
	}else{bshards = bshards.subtract(needb);}

	needb = BigInteger.valueOf(3*blue);
	if(bshards.compareTo(needb)<0){
	    need = need.add(need).add(needb).subtract(bshards);
	    bshards=BigInteger.ZERO;
	}else{bshards = bshards.subtract(needb);}

	System.out.println(need);

	}
}


import java.lang.*;
import java.util.*;
public class Main
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		Long n = in.nextLong();
		Long k = in.nextLong();
		Long ans = 0L;
		if(k == 1)
		{
			ans = n;
		}else{
			for(int i = 63; i >= 0; i--)
			{
				if((n&1<<i))
				{
					for(int j = 0; j <= i; j++)
					{
						ans |= 1<<j;
					}
					break;
				}
			}
		}
		System.out.println(ans);
	}
}


import java.util.*;
import java.io.*;
public class QuestionA{
    public static void main(String[] args)throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] strArray=br.readLine();
        int n=Integer.parseInt(strArray[0]);
        int k=Integer.parseInt(strArray[1]);
        String[] strArray=br.readLine().split("");
        Arrays.sort(strArray);
        String str=Arrays.toString(strArray);
        String temp="";
        int index=0;
        boolean breakLoop=false;
        int[] freqArray=new int[26];
        for(int i=0;i<str.length();i++){
            if(!temp.contains(Character.toString(str.charAt(i)))){
                temp=temp+s.charAt(i);
                freqArray[++i]++;
            }
            else
                freqArray[i]++;
        }
        for(int i=0;i<freqArray.length;i++){
            if(freqArray[i]>k)
               {breakLoop=true;break}
        }
        if(breakLoop)
          System.out.println("NO");
          else
          System.out.println("YES");
    }
}


import java.util.*;
public class Statues {
	static int N;
	static Pair[] b;
	static int[] dx = new int[]{-1,-1,-1,0,1,1,1,0,0};
	static int[] dy = new int[]{-1,0,1,1,1,0,-1,-1,0};

	public static void main(StringProblem[] args){
		Scanner reader = new Scanner(System.in);
		ArrayList<Pair> p = new ArrayList<Pair>();
		for(int i = 0; i < 8; i++){
			char[] in = reader.next().toCharArray();
			for(int j = 0; j < 8; j++)
				if(in[j] == 'S')
					p.add(new Pair(i,j));
		}

		b = new Pair[p.size()];
		b = p.toArray(b);
		N = b.length;
		boolean win = bfs();
		System.out.println(win?"WIN":"LOSE");
	}

	public static boolean bfs(){
		LinkedList<Integer> q = new LinkedList<Integer>();
		boolean[] visited = new boolean[8*8*9];

		q.add(e(7,0,0));
		visited[e(7,0,0)] = true;

		while(!q.isEmpty()){
			//if t == 8, return true;
			int c = q.remove();
			int t = c%9;
			c/=9;
			int y = c%8;
			c/=8;
			int x = c;

			Pair m = new Pair(x,y);

			TreeSet<Pair> statues = new TreeSet<Pair>();
			for(int i = 0; i < N; i++)
				statues.add(new Pair(b[i].x+t,b[i].y));

			if(statues.contains(m))
				continue;
			if(t == 8)
				return true;

			for(int i = 0; i < dx.length; i++){
				int nx = x+dx[i];
				int ny = y+dy[i];
				int nn = e(nx,ny,t+1);
				if(nx >= 0 && nx < 8 && ny >= 0 && ny < 8 && !visited[nn] && !statues.contains(new Pair(nx,ny))){
					visited[nn] = true;
					q.add(nn);
				}
			}
		}

		return false;
	}

	public static int e(int x, int y, int t){
		return x*8*9+y*9+t;
	}

	public static class Pair implements Comparable<Pair>{
		int x,y;
		public Pair(int _x, int _y){
			x = _x;
			y = _y;
		}
		public int compareTo(Pair p){
			if(x==p.x)
				return y-p.y;
			return x-p.x;
		}
	}
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Arrays;

public class abc
{
    int hcf(int a, int h)
    {
     int temp;
     while(1)
     {
     temp = a%h;
     if(temp==0)
     return h;
     a = h;
     h = temp;
     }
    }
	public static void main (String[] args)
	{
	    Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        abc obj = new abc();
        int a,b;
        for (int i=1; i<=n/2; i++)
        {
            if(obj.hcf(i,n-i)==1)
            {
                a=i;
                b=n-i;
            }
        }
        System.out.println(a+" "+b);
	}
}