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 = Console.ReadLine();
             int m = Console.ReadLine();
             int k = Parse(Console.ReadLine();

               if(m<n || n<n)
               Console.WriteLine("No");
            else
            Console.WriteLine("Yes");

        }
    }
}


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 = Console.ReadLine();
             int m = Console.ReadLine();
             int k = Console.ReadLine();

               if(m<n || n<n)
               Console.WriteLine("No");
            else
            Console.WriteLine("Yes");

        }
    }
}


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

namespace holydays
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int min = n / 7 * 2+n%7/6;
            int max = (n > 1) ? 2 + (n - 2) / 7 * 2 : (n > 0) ? 1:0 +(n-2)%7/6 ;
            Console.WriteLine("" + min + ' ' + max);
    }
}


/*
 * Сделано в SharpDevelop.
 * Пользователь: admin
 * Дата: 21.10.2012
 * Время: 10:55
 *
 * Для изменения этого шаблона используйте Сервис | Настройка | Кодирование | Правка стандартных заголовков.
 */

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

using System;

namespace round_146
{
    class Program
    {
        public static void Main(string[] args)
        {
            string[] s =Console.ReadLine().Split(' ');
            int  a = int.Parse(s[0]);
            int  b = int.Parse(s[1]);
            int  c = int.Parse(s[2]);
            Int64 rez = 0;
            int[] d = new int[1000001];
    //один из способов содержать делители числа:
        for (i=1;i<=a*b*c;i++)
          for (j=i;j<=a*b*c;j+=i)
                d[j]++;
    /////////////////////////////////////////////
            for (int i=1;i<=a;i++){

                    for (int j=1; j<=b; j++){

                        for (int k =1; k<=c; k++){

                        rez+= d[i*j*k]+1;

                        }

                    }

             };

             Console.WriteLine(rez%1073741824);

      //     Console.ReadKey();

        }
    }
}


#region License

// Copyright (C) 2012 Kazunori Sakamoto
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#endregion

using System;
using System.IO;

namespace Codeforces {
	public class ProblemE {
		//public static void Main(string[] args) {
		//    new ProblemE().Solve(Console.In);
		//}

		private void Solve(TextReader input) {
			//1:  0,  1
			//2:  3,  2 = 1 * 3, 0 + 1 * 2
			//3:  6,  7 = 2 * 3, 3 + 2 * 2
			//4: 21, 20 = 7 * 3, 6 + 7 * 2
			var n = int.Parse(input.ReadLine()) - 1;
			var d = 0L;
			var notD = 1L;
			for (int i = 0; i < n; i++) {
				var newD = notD * 3 % 1000000007;
				notD = (d + notD * 2) % 1000000007;
				d = newD;
			}
			Console.WriteLine(d);
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using static Template;
using static System.Console;
using static System.Convert;
using static System.Math;
using Pi = Pair<int, int>;

class Solver
{
    Scanner sc = new Scanner();
    //

    public void Solve()
    {
        var a = ReadLine();
        var b = ReadLine();
        if (a.Length < b.Length) Fail(new string(a.OrderByDescending(c => c).ToArray()));
        if (a==b) Fail(a);
        var max = 0L;
        for (var j = 0; j <= a.Length; j++)
        {
            var u = new List<char>();
            for (var i = 0; i < a.Length; i++)
                u.Add(a[i]);
            var res = "";
            for(var i = 0; i < j; i++)
            {
                u.Sort((c, d) => d - c);
                var idx = 0;
                while (idx!=u.Length&&b[i] < u[idx]) idx++;
                if (idx == u.Length || u[idx] != b[i]) goto END;
                res += u[idx]; u.RemoveAt(idx);
            }
            if (j == a.Length)
            {
                chmax(ref max, long.Parse(res));break;
            }
            u.Sort((c, d) => d - c);
            var id = 0;
            while (id != u.Count && b[j] <= u[id]) id++;
            if (id == u.Count) continue;
            res += u[id];u.RemoveAt(id);
            if (u.Count == 0) { chmax(ref max, long.Parse(res));continue; }
            u.Sort((c, d) => d - c);
            for (var i = 0; i < u.Count; i++)
                res += u[i];
            chmax(ref max, long.Parse(res));
        }
    END:;
        WriteLine(max);
    }
}

#region Template
public class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve();
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == 1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == -1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b)
    { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f();
        return rt;
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<int, T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f(i);
        return rt;
    }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}

public class Scanner
{
    public string Str => ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    public Pair<T1, T2> PairMake<T1, T2>() => new Pair<T1, T2>(Next<T1>(), Next<T2>());
    public Pair<T1, T2, T3> PairMake<T1, T2, T3>() => new Pair<T1, T2, T3>(Next<T1>(), Next<T2>(), Next<T3>());
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
}

public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Tie(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Tie(out T1 a, out T2 b, out T3 c) { Tie(out a, out b); c = v3; }
}
#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using static Template;
using static System.Console;
using static System.Convert;
using static System.Math;
using Pi = Pair<int, int>;

class Solver
{
    Scanner sc = new Scanner();
    //

    public void Solve()
    {
        var a = ReadLine();
        var b = ReadLine();
        if (a.Length < b.Length) Fail(new string(a.OrderByDescending(c => c).ToArray()));
        var u = new List<char>();
        for (var i = 0; i < a.Length; i++)
            u.Add(a[i]);
        var res = "";var tg = true;
        for(var i = 0; i < a.Length; i++)
        {
            u.Sort((a,b)=>b-a);
            var idx = 0;
            if (!tg) { res += u[0];u.RemoveAt(0);continue; }
            while (b[i] < u[idx]) idx++;
            tg = b[i] == u[idx];
            res += u[idx];u.RemoveAt(idx);
        }
        WriteLine(res);
    }
}

#region Template
public class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve();
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == 1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T>
    { if (a.CompareTo(b) == -1) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b)
    { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f();
        return rt;
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static T[] Create<T>(int n, Func<int, T> f)
    {
        var rt = new T[n];
        for (var i = 0; i < rt.Length; ++i)
            rt[i] = f(i);
        return rt;
    }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}

public class Scanner
{
    public string Str => ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    public Pair<T1, T2> PairMake<T1, T2>() => new Pair<T1, T2>(Next<T1>(), Next<T2>());
    public Pair<T1, T2, T3> PairMake<T1, T2, T3>() => new Pair<T1, T2, T3>(Next<T1>(), Next<T2>(), Next<T3>());
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
}

public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Tie(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Tie(out T1 a, out T2 b, out T3 c) { Tie(out a, out b); c = v3; }
}
#endregion


using System;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] sequence = new string[4];
            sequence[0] = Console.ReadLine();
            sequence[0] = sequence[0].Remove(0, 2);
            sequence[1] = Console.ReadLine();
            sequence[1] = sequence[1].Remove(0, 2);
            sequence[2] = Console.ReadLine();
            sequence[2] = sequence[2].Remove(0, 2);
            sequence[3] = Console.ReadLine();
            sequence[3] = sequence[3].Remove(0,2);
            if (sequence[0].Length >= (sequence[1].Length * 2) && sequence[0].Length >= (sequence[2].Length * 2) && sequence[0].Length >= (sequence[3].Length * 2))
            {
                if (sequence[1].Length >= (sequence[2].Length * 2) || (sequence[1].Length >= (sequence[3].Length * 2) || ((sequence[1].Length*2) <= sequence[2].Length) || ((sequence[1].Length*2) <= sequence[3].Length) || (sequence[2].Length >= (sequence[11].Length * 2)) || (sequence[2].Length >= (sequence[3].Length * 2) || ((sequence[2].Length*2) <= sequence[1].Length) || ((sequence[2].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[2].Length * 2)) || ((sequence[3].Length*2) <= sequence[2].Length) || ((sequence[3].Length*2) <= sequence[1].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("A");
            }
            else if (sequence[1].Length >= (sequence[0].Length * 2) && sequence[1].Length >= (sequence[2].Length * 2) && sequence[1].Length >= (sequence[3].Length * 2))
            {
                if (sequence[0].Length >= (sequence[2].Length * 2) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[2].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[2].Length >= (sequence[11].Length * 2)) || (sequence[2].Length >= (sequence[3].Length * 2) || ((sequence[2].Length*2) <= sequence[0].Length) || ((sequence[2].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[2].Length * 2)) || ((sequence[3].Length*2) <= sequence[2].Length) || ((sequence[3].Length*2) <= sequence[0].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("B");
            }
            else if (sequence[2].Length >= (sequence[0].Length * 2) && sequence[2].Length >= (sequence[1].Length * 2) && sequence[2].Length >= (sequence[3].Length * 2))
            {
                if (sequence[1].Length >= (sequence[0].Length * 2) || (sequence[1].Length >= (sequence[3].Length * 2) || ((sequence[1].Length*2) <= sequence[0].Length) || ((sequence[1].Length*2) <= sequence[3].Length) || (sequence[0].Length >= (sequence[11].Length * 2)) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[1].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[0].Length * 2)) || ((sequence[3].Length*2) <= sequence[0].Length) || ((sequence[3].Length*2) <= sequence[1].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("C");
            }
            else if (sequence[3].Length >= (sequence[0].Length * 2) && sequence[3].Length >= (sequence[1].Length * 2) && sequence[3].Length >= (sequence[2].Length * 2))
            {
                if (sequence[1].Length >= (sequence[0].Length * 2) || (sequence[1].Length >= (sequence[3].Length * 2) || ((sequence[1].Length*2) <= sequence[0].Length) || ((sequence[1].Length*2) <= sequence[3].Length) || (sequence[0].Length >= (sequence[11].Length * 2)) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[1].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[0].Length * 2)) || ((sequence[3].Length*2) <= sequence[0].Length) || ((sequence[3].Length*2) <= sequence[1].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("D");
            }
            else if ((sequence[0].Length * 2) <= sequence[1].Length && (sequence[0].Length * 2) <= sequence[2].Length && (sequence[0].Length * 2) <= sequence[3].Length)
            {
                if (sequence[0].Length >= (sequence[2].Length * 2) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[2].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[2].Length >= (sequence[11].Length * 2)) || (sequence[2].Length >= (sequence[3].Length * 2) || ((sequence[2].Length*2) <= sequence[0].Length) || ((sequence[2].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[2].Length * 2)) || ((sequence[3].Length*2) <= sequence[2].Length) || ((sequence[3].Length*2) <= sequence[0].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("A");
            }
            else if ((sequence[1].Length * 2) <= sequence[0].Length && (sequence[1].Length * 2) <= sequence[2].Length && (sequence[1].Length * 2) <= sequence[3].Length)
            {
                if (sequence[0].Length >= (sequence[2].Length * 2) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[2].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[2].Length >= (sequence[11].Length * 2)) || (sequence[2].Length >= (sequence[3].Length * 2) || ((sequence[2].Length*2) <= sequence[0].Length) || ((sequence[2].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[2].Length * 2)) || ((sequence[3].Length*2) <= sequence[2].Length) || ((sequence[3].Length*2) <= sequence[0].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("B");
            }
            else if ((sequence[2].Length * 2) <= sequence[0].Length && (sequence[2].Length * 2) <= sequence[1].Length && (sequence[2].Length * 2) <= sequence[3].Length)
            {
                if (sequence[1].Length >= (sequence[0].Length * 2) || (sequence[1].Length >= (sequence[3].Length * 2) || ((sequence[1].Length*2) <= sequence[0].Length) || ((sequence[1].Length*2) <= sequence[3].Length) || (sequence[0].Length >= (sequence[11].Length * 2)) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[1].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[0].Length * 2)) || ((sequence[3].Length*2) <= sequence[0].Length) || ((sequence[3].Length*2) <= sequence[1].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("C");
            }
            else if ((sequence[3].Length * 2) <= sequence[0].Length && (sequence[3].Length * 2) <= sequence[1].Length && (sequence[3].Length * 2) <= sequence[2].Length)
            {
                if (sequence[1].Length >= (sequence[0].Length * 2) || (sequence[1].Length >= (sequence[3].Length * 2) || ((sequence[1].Length*2) <= sequence[0].Length) || ((sequence[1].Length*2) <= sequence[3].Length) || (sequence[0].Length >= (sequence[11].Length * 2)) || (sequence[0].Length >= (sequence[3].Length * 2) || ((sequence[0].Length*2) <= sequence[1].Length) || ((sequence[0].Length*2) <= sequence[3].Length) || (sequence[3].Length >= (sequence[0].Length * 2)) || ((sequence[3].Length*2) <= sequence[0].Length) || ((sequence[3].Length*2) <= sequence[1].Length))
                {
                    Console.WriteLine("C");
                }
                else
                    Console.WriteLine("D");
            }            else
                Console.WriteLine("C");
        }
    }
}


using System;

class Program{
	private static void Main(){
		float a,b,c,d; //input
		char ans=null; //correct answer
		ushort num = 0; //number of peculiar answers
		a=(Console.ReadLine().Split('.')[1]).Length;
		b=(Console.ReadLine().Split('.')[1]).Length;
		c=(Console.ReadLine().Split('.')[1]).Length;
		d=(Console.ReadLine().Split('.')[1]).Length;

		if( (a/b>=2 && a/c>=2 && a/d==2) || (a/d<=0.5 && a/b<=0.5 && a/c<=0.5) )
		{ ans='A'; num++; }

		if( (b/a>=2 && b/c>=2 && b/d==2) || (b/a<=0.5 && b/c<=0.5 && b/d<=0.5) )
		{ ans='B'; num++; }

		if( (c/a>=2 && c/a>=2 && c/d==2) || (c/a<=0.5 && c/b<=0.5 && c/d<=0.5) )
		{ ans='C'; num++; }

		if( (d/a>=2 && d/b>=2 && d/c==2) || (d/a<=0.5 && d/b<=0.5 && d/c<=0.5) )
		{ ans='D'; num++; }

		if(num>1) ans='C';

		Console.WriteLine(ans);
	}

}


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

namespace The_Child_and_Homework
{
    class Program
    {
        static void Main(string[] args)
        {
            IO io = new IO();

            string s_A = io.ReadStr();
            string s_B = io.ReadStr();
            string s_C = io.ReadStr();
            string s_D = io.ReadStr();
            if (Cmp(s_A, s_B, s_C, s_D) && !Cmp(s_B, s_A, s_C, s_D) && !Cmp(s_D, s_B, s_C, s_A) && !Cmp(s_C, s_D, s_B, s_A)) io.PutStr("A");
            else if (!Cmp(s_A, s_B, s_C, s_D)&&Cmp(s_B, s_A, s_C, s_D)&&!Cmp(s_D, s_B, s_C, s_A)&&!Cmp(s_C, s_D, s_B, s_A)) io.PutStr("B");
            else if (!Cmp(s_A, s_B, s_C, s_D) && !Cmp(s_B, s_A, s_C, s_D) && Cmp(s_D, s_B, s_C, s_A) && !Cmp(s_C, s_D, s_B s_A)) io.PutStr("D");
            else io.PutStr("C");
            io.ReadStr();

        }

        static bool Cmp(string s_A,string s_B,string s_C,string s_D)
        {
            if (((s_A.Length - 2) >= 2 * (s_B.Length - 2) && (s_A.Length - 2) >= 2 * (s_C.Length - 2) && (s_A.Length - 2) >= 2 * (s_D.Length - 2)) || (2 * (s_A.Length - 2) <= (s_B.Length - 2) && 2 * (s_A.Length - 2) <= (s_C.Length - 2) && 2 * (s_A.Length - 2) <= (s_D.Length - 2)))
            {
                return true;
            }
            return false;
        }

    }

    class IO
    {
        private static Queue<string> currentLineTokens = new Queue<string>();
        private static string[] ReadAndSplitLine()
        {
            return Console.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
        }
        public int ReadNextInt()
        {
            return int.Parse(ReadToken());
        }
        public long ReadNextLong()
        {
            return long.Parse(ReadToken());
        }

        public int ReadInt()
        {
            return Convert.ToInt32(Console.ReadLine());
        }
        public long ReadLong()
        {
            return Convert.ToInt64(Console.ReadLine());
        }
        public string ReadStr()
        {
            return Console.ReadLine();
        }
        public string[] ReadStrArr()
        {
            return Console.ReadLine().Split(' ');
        }
        public int[] ReadIntArr()
        {
            return Array.ConvertAll<string, int>(Console.ReadLine().Split(' '), s => int.Parse(s));
        }
        public long[] ReadLongArr()
        {
            return Array.ConvertAll<string, long>(Console.ReadLine().Split(' '), s => long.Parse(s));
        }
        public void PutStr(string str)
        {
            Console.WriteLine(str);
        }
        public void PutStr(int str)
        {
            Console.WriteLine(str);
        }
        public void PutStr(long str)
        {
            Console.WriteLine(str);
        }

        public static string ReadToken()
        {
            while (currentLineTokens.Count == 0)
                currentLineTokens = new Queue<string>(ReadAndSplitLine());
            return currentLineTokens.Dequeue();
        }
    }
}


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

namespace TheChildAndHomework
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] res = {"A", "B", "C", "D" };
            string[] input = new string[4];
            for (int i = 0; i < 4; i++)
                input[i] = Console.ReadLine().Split('.')[1];
            List<int> lengths = new List<int>();
            string result = "C";
            for (int i = 0; i < input.Length; i++)
                lengths.Add(input[i].Length);
            for (int i = 0; i < lengths.Count; i++)
            {
                int len = lengths[0];
                if (lengths.Skip(1).Take(3).All(x => len => x * 2) || lengths.Skip(1).Take(3).All(x => len <= x / 2))
                    result = res[i];
                lengths.Add(lengths[0]);
                lengths.RemoveAt(0);
            }
            Console.WriteLine(result);
            Console.ReadLine();
        }
    }
}


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

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            string str1 = Console.ReadLine();
            string str2 = Console.ReadLine();
            string str3 = Console.ReadLine();
            int r1 = 0;
            int r2 = 0;
            int c1 = 0;
            int c2 = 0;
            int d1 = 0;
            int d2 = 0;
            int x11 = 0;
            int x12 = 0;
            int x21 = 0;
            int x22 = 0;
            string[] strin1 = str1.Split(' ');
            string[] strin2 = str2.Split(' ');
            string[] strin3 = str3.Split(' ');
            r1 = int.Parse(strin1[0]);
            r2 = int.Parse(strin1[1]);
            c1 = int.Parse(strin2[0]);
            c2 = int.Parse(strin2[1]);
            d1 = int.Parse(strin3[0]);
            d2 = int.Parse(strin3[1]);
            x11 = (r1 + c1 - d2) / 2;
            x22 = (r2 + c2 - d2) / 2;
            x12 = r1 - (r1 + c1 - d2) / 2;
            x21 = r2 - (r2 + c2 - d2) / 2;
            if (((r1 + c1 - d2) % 2 == 1) || ((r2 + c2 - d2) % 2 == 1) || (x11 == x12) || (x11 == x21) || (x11 == x22))
            {
                Console.WriteLine("-1");

            }
            else {
                Console.WriteLine(x11 + " " + x12);
                Console.WriteLine(x21 + " " + x22);

            }
            Console.ReadLine();
        }
    }
} using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            string str1 = Console.ReadLine();
            string str2 = Console.ReadLine();
            string str3 = Console.ReadLine();
            int r1 = 0;
            int r2 = 0;
            int c1 = 0;
            int c2 = 0;
            int d1 = 0;
            int d2 = 0;
            int x11 = 0;
            int x12 = 0;
            int x21 = 0;
            int x22 = 0;
            string[] strin1 = str1.Split(' ');
            string[] strin2 = str2.Split(' ');
            string[] strin3 = str3.Split(' ');
            r1 = int.Parse(strin1[0]);
            r2 = int.Parse(strin1[1]);
            c1 = int.Parse(strin2[0]);
            c2 = int.Parse(strin2[1]);
            d1 = int.Parse(strin3[0]);
            d2 = int.Parse(strin3[1]);
            x11 = (r1 + c1 - d2) / 2;
            x22 = (r2 + c2 - d2) / 2;
            x12 = r1 - (r1 + c1 - d2) / 2;
            x21 = r2 - (r2 + c2 - d2) / 2;
            if (((r1 + c1 - d2) % 2 == 1) || ((r2 + c2 - d2) % 2 == 1) || (x11 == x12) || (x11 == x21) || (x11 == x22))
            {
                Console.WriteLine("-1");

            }
            else {
                Console.WriteLine(x11 + " " + x12);
                Console.WriteLine(x21 + " " + x22);

            }
            Console.ReadLine();
        }
    }
}


class Program
{
    public static void Main(string[] args)
    {
        List<string> read = new List<string>();
        for (int i = 1; i <= 3; i++)
            read.Add(Console.ReadLine());
        List<List<int>> list = new List<List<int>>();
        foreach (string s in read)
        {
            var curr = s.Split();
            list.Add(new List<int>() { Convert.ToInt32(curr[0]),
                Convert.ToInt32(curr[1]) });
        }
        var result = new PuzzleSolver(list[0][0], list[0][1],
            list[1][0], list[1][1], list[2][0], list[2][1]).Solve();
        if (result[0] == -1)
            Console.WriteLine(-1);
        else
        {
            Console.WriteLine(result[0].ToString() + ' ' + result[1]);
            Console.WriteLine(result[2].ToString() + ' ' + result[3]);
        }
    }
}

class PuzzleSolver
{

    int r1;
    int r2;
    int c1;
    int c2;
    int d1;
    int d2;

    public PuzzleSolver(int r1, int r2, int c1, int c2, int d1, int d2)
    {
        this.r1 = r1;
        this.r2 = r2;
        this.c1 = c1;
        this.c2 = c2;
        this.d1 = d1;
        this.d2 = d2;
    }

    public List<int> Solve()
    {
        List<int> result = new List<int>();
        List<int> defaultResult = new List<int>();
        defaultResult.Add(-1);
        for (int i1 = 1; i1 <= 9; i1++)
        {
            int key = 1 << i1;
            int i2 = r1 - i1;
            if (!Check(key, i2))
            {
                continue;
            }
            key = 1 << i2;
            int i3 = c1 - i1;
            int i4 = d1 - i1;
            if (i3 == i4)
                continue;
            if (!Check(key, i3) || !Check(key, i4))
                continue;
            if (Validate(i1, i2, i3, i4))
            {
                result = new List<int>() { i1, i2, i3, i4 };
                return result;
            }
        }
        return defaultResult;
    }

    private bool Validate(int i1, int i2, int i3, int i4)
    {
        return i3 + i4 == r2 && d2 == i2 + i3 && c2 == i2 + i4;
    }

    public bool Check(int key, int num)
    {
        return num > 0 && num <= 9 && (key & (1 << num)) == 0;
    }
}


using System;
using System.Linq;

class P {
  static void Main() {
    var r = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var c = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var d = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var res = new [] { new int[2], new int[2] };
    res[0][1] = r[0] + c[1] - d[0];
    if (res[0,1] % 2 == 1) { Console.WriteLine(-1); return; }
    res[0][1] /= 2;
    res[0][0] = r[0] - res[0][1];
    res[1][0] = c[0] - res[0][0];
    res[1][1] = r[1] - res[1][1];
    if (res.SelectMany(aa => aa).Distinct().Count(x => x>=1 && x<=9)<4 || res[0][1]+res[1][1] != c[1] || res[0][0]+res[1][1] != d[0] || res[0][1]+res[1][0] != d[1]) { Console.Write(-1); return; }

    Console.WriteLine("{0} {1}", res[0][0], res[0][1]);
    Console.WriteLine("{0} {1}", res[1][0], res[1][1]);
  }
}


using System;
using System.Linq;

class P {
  static void Main() {
    var r = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var c = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var d = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var res = new int[2,2];
    res[0,1] = r[0] + c[1] - d[0];
    if (res[0,1] % 2 == 1) { Console.WriteLine(-1); return; }
    res[0,1] /= 2;
    res[0,0] = r[0] - res[0,1];
    res[1,0] = c[0] - res[0,0];
    res[1,1] = r[1] - res[1,1];
    if (res.Distinct().Count(x => x>=1 && x<=9)<4 || res[0,1]+res[1,1] != c[1] || res[0,0]+res[1,1] != d[0] || res[0,1]+res[1,0] != d[1]) { Console.Write(-1); return; }

    Console.WriteLine("{0} {1}", res[0,0], res[0,1]);
    Console.WriteLine("{0} {1}", res[1,0], res[1,1]);
  }
}


using System;
using System.Linq;

class P {
  static void Main() {
    var r = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var c = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var d = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    var res = new int[2,2]
    res[0,1] = r[0] + c[1] - d[0];
    if (res[0,1] % 2 == 1) { Console.WriteLine(-1); return; }
    res[0,1] /= 2;
    res[0,0] = r[0] - res[0,1];
    res[1,0] = c[0] - res[0,0];
    res[1,1] = r[1] - res[1,1];
    if (res.Distinct().Count(x => x>=1 && x<=9)<4 || res[0,1]+res[1,1] != c[1] || res[0,0]+res[1,1] != d[0] || res[0,1]+res[1,0] != d[1]) { Console.Write(-1); return; }

    Console.WriteLine("{0} {1}", res[0,0], res[0,1]);
    Console.WriteLine("{0} {1}", res[1,0], res[1,1]);
  }
}


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

namespace CodeForces
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            var test = Console.ReadLine();
            var input = Console.ReadLine();
            var dict = GetDict();
            StringBuilder sb = new StringBuilder();
            foreach(char c in input)
            {
                if (c == '0' || c == '1') continue;
                sb.Append(dict[c - '0']);
            }
            var result = sb.ToString().ToCharArray();
            Array.Sort(result);
            Array.Reverse(result);
            Console.WriteLine(new string(result));

        }

        private static Dictionary<int, int> GetFactorial()
        {
            Dictionary<int, int> factorial = new Dictionary<int, int>();
            factorial.Add(2, 2);
            for (int i = 3; i <= 9; i++)
            {
                factorial.Add(i, factorial[i - 1] * i);
            }
            return factorial;
        }

        private static Dictionary<int,string> GetDict()
        {
            Dictionary<int, string> dict = new Dictionary<int, string>();
            var factorial = GetFactorial();
            dict.Add(2, "2");
            for (int i = 3; i <= 9; i++)
            {
                string result = "";
                int iter = i;
                var temp = factorial.Keys.ToArray();
                Array.Sort(temp);
                Array.Reverse(temp);
                foreach (int z in temp)
                {
                    int j = factorial[z];
                    while (i % j == 0 && i > 1)
                    {
                        i = i / j;
                        result += z.ToString();
                    }
                    if (i <= 1) break;
                }
                if(i == 1 )
                {
                    result += dict[iter - 1];
                    dict.Add(iter, result);
                }
                else
                {
                    dict.Add(iter, Convert.ToString(iter));
                }
                i = iter;
            }
            dict[9] = "332;"
            return dict;
        }

    }
}


using System;
using System.Collections.Generic;

namespace CodeForces
{
    class Program
    {
        public static List<int> ReadListOfInts()
        {
            var s = Console.ReadLine();
            char delimiter = ' ';
            return s.Split(delimiter).Select(int.Parse).ToList();
        }

        static void Main(string[] args)
        {
            int n, k, cur = -1, T = -1;
            string s, ans = "NO";
            List<int> list = ReadListOfInts();
            n = list[0];
            k = list[1];
            s = Console.ReadLine();
            for (int i = 0; i < n; i++){
                if (s[i].Equals('G')) {
                    cur = i;
                }
                if (s[i].Equals('T')) {
                    T = i;
                }
            }
            if (cur > T) {
                char[] charArray = s.ToCharArray();
                Array.Reverse(charArray);
                s = new string(charArray);
                cur = n - 1 - cur;
            }
            if(cur > -1)
                for (int i = cur; i < n; i+=k){
                    if (s[i] == 'T')
                    {
                        ans = "YES";
                        break;
                    }
                    else
                    if (s[i] == '.')
                    {
                        continue;
                    }
                    else
                    if (s[i] == '#') {
                        break;
                    }
                }

            Console.WriteLine(ans);

            //Console.ReadKey();

        }
    }
}


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

namespace Achill
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> cord = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();
            List<int> step = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();
            double LeftO(double y) => (y - cord[1]) / step[1];
            double y = 0.5 * step[1] * ((cord[2] - cord[0])/step[0] + (cord[1]  + cord[3]) / step[1]);
            double x = LeftO(y) * step[0] + cord[0];
            bool res = Math.Truncate(x) == x && Math.Truncate(y) == y;
            if (res)
            {
                res = (Math.Abs(x-cord[0])%step[0] == 0) && (Math.Abs(y - cord[1]) % step[1] == 0);
                res = res && (Math.Abs(x - cord[2]) % step[0] == 0) && (Math.Abs(y - cord[3]) % step[1] == 0);
            }
            Console.WriteLine(res ? "YES" : "NO");
        }
    }
}


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

namespace Achill
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> cord = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();
            List<int> step = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();
            Func<double, double> LeftO = y => (y - cord[1]) / step[1];
            double y = 0.5 * step[1] * ((cord[2] - cord[0])/step[0] + (cord[1]  + cord[3]) / step[1]);
            double x = LeftO(y) * step[0] + cord[0];
            bool res = Math.Truncate(x) == x && Math.Truncate(y) == y;
            if (res)
            {
                res = (Math.Abs(x-cord[0])%step[0] == 0) && (Math.Abs(y - cord[1]) % step[1] == 0);
                res = res && (Math.Abs(x - cord[2]) % step[0] == 0) && (Math.Abs(y - cord[3]) % step[1] == 0);
            }
            Console.WriteLine(res ? "YES" : "NO");
        }
    }
}


/*
 * Created by SharpDevelop.
 * Date: 21.07.2016 - 21.07.2016
 * Time: 21:56
 *

������������� ������������� � ������ � ������� ����� 22 ����
���������� ����������� �� ������ ������� � ��������� � ���
������������ ����� �� ����� 6

C. ��������
�������� ���� ����� ������� n ����!
� ���� ����� �� ��� ����� �������� ���� ������ ����������������, � ����� ������������ �������.
��� ������ �� n ���� ������� ���� �����, ����� �� ������ � ���� ���� ��������,
� ����� ����� �� � ��������� � ���� ���� ����������� �������.
��� i-�� ��� �������� ������ ��������:
1.	� ���� ���� ������ �������� � �� ���������� �������;
2.	� ���� ���� ������ �������� � ���������� �������;
3.	� ���� ���� ������ �������� � �� ���������� �������;
4.	� ���� ���� ������ �������� � ���������� �������.
� ������ �� ���� ���� ����� ���� ��������, ���� ������ ������� (���� �� ���������� � ���� ����), ���� ���������� ������� (���� ������ ��������).
����� ���� ����� ������ ����� ����������� ���������� ����, � ������� ���� ����� ��������
(�� ���� �� ����� ���������� ������� � �� ����� ������ ������� ������������).
������������ ����������� �� ���� � �� �� ����� ��� ��� ������ ���������� ����� � ��� �� ����� ����������,
�� ���� �� �� ����� ���������� ������� ��� ��� ������ � �� �� ����� ������ �������� ��� ��� ������.
������� ������
� ������ ������ ������� ����� ������������� ����� n (1 <= n <= 100) � ���������� ���� � ��������� ����.
�� ������ ������ ������� ����� ������ ������������������ ����� ����� a1, a2, ..., an (0 <= ai <= 3), ���:
�	ai ����� 0, ���� � i-� ���� ������� �� �������� �������� � �� ���������� �������;
�	ai ����� 1, ���� � i-� ���� ������� �� �������� ��������, �� ���������� �������;
�	ai ����� 2, ���� � i-� ���� ������� �������� �������� � �� ���������� �������;
�	ai ����� 3, ���� � i-� ���� ������� �������� �������� � ���������� �������.
�������� ������
�������� ���������� ��������� ���������� ����, � ������� ���� ����� ��������. �������, ��� ���� ������������:
�	���������� ������� � �����-���� ��� ������ ������ ���,
�	������ ������� � �����-���� ��� ������ ������ ���.
�������
������� ������
4
1 3 2 0
�������� ������
2
������� ������
7
1 3 3 2 1 2 3
�������� ������
0
������� ������
2
2 2
�������� ������
1
����������
� ������ �������� ������� ���� ����� �������� ������� � ���� ����� 1 � ������������ ������� � ���� ����� 3.
����� �������, �� ����� �������� ����� ��� ���.
�� ������ �������� ������� ���� ������ ������ �������� � ��� � �������� 1, 3, 5 � 7, � � ��������� ��� ���������� �������.
����� �������, �� �� ����� �������� �� ������ ���.
� ������� �������� ������� ���� ����� ������������ ������� ���� � ���� ����� 1, ���� � ���� ����� 2.
�� �� ����� ���������� ������� ��� ���, ��� ��� ��� ����� ������������� ��� �����������. ����� �������, �� ����� �������� ���� ����.

 */

using System;
using System.IO;

class Program
{
	public static void Swap (ref int a, ref int b)
	{
		int temp = a;
		a = b;
		b = temp;
	}

	public static void Main(string[] args)
	{
# if ( ! ONLINE_JUDGE )
		StreamReader sr = new StreamReader ("C:\\TRR\\20160720\\C.txt");
		StreamWriter sw = new StreamWriter ("C:\\TRR\\20160720\\C.out");
# endif

		string ss;

# if ( ONLINE_JUDGE )
		ss = Console.ReadLine ();
# else
		ss = sr.ReadLine ();
# endif

		int n = int.Parse (ss);

		int [] a = new int [n];

# if ( ONLINE_JUDGE )
		ss = Console.ReadLine ();
# else
		ss = sr.ReadLine ();
# endif

		string [] s = ss.Split (' ');

		int k = 0, v = 0, w = 0;
		int vprev = 0, wprev = 0;	// vprev >= wprev
		for ( int i = 0; i < n; i++ )
		{
			a [i] = int.Parse (s [i]);
# if ( ! ONLINE_JUDGE )
			sw.Write (a [i] + " ");
# endif

			if ( a [i] == 0 )
			{
				k += ( v > w ? v : w );
				v = 0; w = 0;
				vprev = 0; wprev = 0;
			}
			else if ( a [i] == 1 )
			{
				if ( vprev == 1 )
				{
					w++; wprev = 1;
					vprev = 0;
				}
				else if ( vprev == 2 )
				{
					v++; vprev = 1;
					wprev = 0;
				}
				else
				{
					v++; vprev = 1;
				}
			}
			else if ( a [i] == 2 )
			{
				if ( vprev == 2 )
				{
					w++; wprev = 2;
					vprev = 0;
				}
				else if ( vprev == 1 )
				{
					v++; vprev = 2;
					wprev = 0;
				}
				else
				{
					v++; vprev = 2;
				}
			}
			else	// if ( a [i] == 3 )
			{
				if ( vprev == 1 && wprev == 0 )
				{
					v++; w++;
					vprev = 2; wprev = 1;
				}
				else if ( vprev == 2 && wprev == 1 )
				{
					v++; w++;
					vprev = 1; wprev = 2;
				}
				else if ( vprev = 2 && wprev == 0 )
				{
					v++; w++;
					v = ( v > w ? v : w ); w = 0;
					vprev = 1; wprev = 0;
				}
				else // if ( vprev == 0 && wprev == 0 )
				{
					v++; w++;
					vprev = 2; wprev = 1;
				}
			}
			if ( vprev < wprev )
			{
				Swap (ref v, ref w);
				Swap (ref vprev, ref wprev);
			}

# if ( ! ONLINE_JUDGE )
		sw.WriteLine ("v=" + v + " vprev=" + vprev + " w=" + w + " wprev=" + wprev);
# endif
		}

		k += ( v > w ? v : w );
		k = n - k;

# if ( ONLINE_JUDGE )
		Console.WriteLine (k);
# else
		sw.WriteLine ();
		sw.WriteLine (k);
# endif

# if ( ! ONLINE_JUDGE )
		sw.Close ();
# endif

//		Console.ReadKey ();
	}
}


using System;

public class Program
{
	public static void Main()
	{
		solve_547A();
	}

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

		int a = Convert.ToInt32(tests[0]);
		int b = Convert.ToInt32(tests[1]);

		List<int> divs = new List<int>();
		int div;
		if (a > b)
		{
			div = (a % b == 0) ? a / b : -1;
		}
		else
		{
			div = (b % a == 0) ? b / a : -1;
		}

		if (div == 1)
		{
			Console.WriteLine(0);
		}
		if (div == -1)
		{
			Console.WriteLine(-1);
		}
		if (div > 1)
		{
			while (true)
			{
				if (div % 2 == 0)
				{
					div /= 2;
					divs.Add(2);
				}
				else if (div % 3 == 0)
				{
					div /= 3;
					divs.Add(3);
				}
				else
				{
					if (div > 3)
					{
						divs.Clear();
						divs.Add(-1);
					}
					break;
				}
			}

			if (divs.Count == 1 && divs[0] == -1)
			{
				Console.WriteLine(-1);
			}

			if (divs.Count > 1)
			{
				Console.WriteLine(divs.Count);
			}
		}
	}

}


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

class Startup
{
    static void Main()
    {
        int[] intInput = ReadLineAndParseToArray();
        int n = intInput[0];
        int nTemp = n;
        int m = intInput[1];

        if(n == m) { Console.WriteLine($"0"); return; }
        if((m % 2*n != 0 || m < 2*n ) && ( m % 3*n != 0 || m < 3*n) && ( m % 6*n != 0 || m < 6*n))  { Console.WriteLine("-1"); return; }

        int counter2 = 0;
        int counter3 = 0;
        while(nTemp % 2 == 0) { nTemp /= 2; counter2++; }
        while(nTemp % 3 == 0) { nTemp /= 3; counter3++; }

        int counter22 = 0;
        int counter33 = 0;
        while(m % 2 == 0 ) { m /= 2; counter22++; }
        while(m % 3 == 0) { m /= 3; counter33++; }
        counter22 -= counter2;
        counter33 -= counter3;
        for(int i = 0; i < counter22; i++){
            n *= 2;
        }
        for(int i = 0 ; i < counter33; i++){
            n *= 3;
        }
        if(n != m) { Console.WriteLine("-1"); return; }
        counter = counter22 + counter33 - counter2 - counter3;
        Console.WriteLine($"{counter}");

    }

    static int[] ReadLineAndParseToArray()
    {
        return Console.ReadLine().Split().Select(int.Parse).ToArray();
    }

}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;

namespace Olymp
{
  public class ProblemSolver
  {
    private readonly Tokenizer input;

    public void Solve()
    {
      var (n, l, r) = input.Read3Int();
      long s(int k) => Enumerable.Range(0, k).Select(i => 1L << i).Sum();
      var s1 = s(l) + n - l;
      var s2 = s(r) + (1L << (r - 1)) * (n - r);
      Write(s1 + " " + s2);
    }

    public ProblemSolver(TextReader input)
    {
      this.input = new Tokenizer(input);
    }
  }

  #region Service classes

  public class Tokenizer
  {
    private readonly TextReader reader;

    public string ReadToEnd()
    {
      return reader.ReadToEnd();
    }

    public int ReadInt()
    {
      var c = SkipWS();
      if (c == -1)
        throw new EndOfStreamException();
      var isNegative = false;
      if (c == '-' || c == '+')
      {
        isNegative = c == '-';
        c = reader.Read();
        if (c == -1)
          throw new EndOfStreamException("Digit expected, but end of stream occurs");
      }
      if (!char.IsDigit((char)c))
        throw new InvalidOperationException($"Digit expected, but was: '{(char)c}'");
      var result = (char)c - '0';
      c = reader.Read();
      while (c > 0 && !char.IsWhiteSpace((char)c))
      {
        if (!char.IsDigit((char)c))
          throw new InvalidOperationException($"Digit expected, but was: '{(char)c}'");
        result = result * 10 + (char)c - '0';
        c = reader.Read();
      }
      if (isNegative)
        result = -result;
      return result;
    }

    public string ReadLine()
    {
      return reader.ReadLine();
    }

    public long ReadLong()
    {
      return long.Parse(ReadToken());
    }

    public double ReadDouble()
    {
      return double.Parse(ReadToken(), CultureInfo.InvariantCulture);
    }

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

    public (int, int) Read2Int() =>
      (ReadInt(), ReadInt());

    public (int, int, int) Read3Int() =>
      (ReadInt(), ReadInt(), ReadInt());

    public (int, int, int, int) Read4Int() =>
      (ReadInt(), ReadInt(), ReadInt(), ReadInt());

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

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

    public string ReadToken()
    {
      var c = SkipWS();
      if (c == -1)
        return null;
      var sb = new StringBuilder();
      while (c > 0 && !char.IsWhiteSpace((char)c))
      {
        sb.Append((char)c);
        c = reader.Read();
      }
      return sb.ToString();
    }

    private int SkipWS()
    {
      var c = reader.Read();
      if (c == -1)
        return c;
      while (c > 0 && char.IsWhiteSpace((char)c))
        c = reader.Read();
      return c;
    }

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

  internal class Program
  {
    public static void Main()
    {
      var solver = new ProblemSolver(In);
      solver.Solve();
    }
  }

  #endregion
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using static System.Console;
using static System.Convert;
using static System.Math;
//using static System.Globalization.CultureInfo;
using System.Text;
class Program
{
    private static void chmin<T>(ref T num, T val) where T : IComparable<T>
        => num = num.CompareTo(val) == 1 ? val : num;
    private static void chmax<T>(ref T num, T val) where T : IComparable<T>
        => num = num.CompareTo(val) == -1 ? val : num;
    private static void swap<T>(ref T v1,ref T v2)
    { var t = v2;v2 = v1;v1 = t; }
    static void Main(string[] args)
    {
        var pr = new Program();
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        pr.Solve();
        Console.Out.Flush();
    }
    void Solve()
    {
        int n, l, r;
        Input.Make(out n, out l, out r);
        var min = n - l + 1;
        var c = 1;
        for(var i=1;i<l;i++)
        {
            c *= 2;
            min += c;
        }
        var max = 1L;
        c = 1L;
        for(var i=1;i<r;i++)
        {
            c *= 2;
            max += c;
        }
        WriteLine($"{min} {max + c * (n - r)}");
    }
}

public class Input
{
    public static string read => ReadLine().Trim();
    public static int[] ar => read.Split(' ').Select(int.Parse).ToArray();
    public static int num => ToInt32(read);
    public static long[] arL => read.Split(' ').Select(long.Parse).ToArray();
    public static long numL => ToInt64(read);
    public static T[] create<T>(int n, Func<int, T> f)
        => Enumerable.Repeat(0, n).Select(f).ToArray();
    public static char[][] grid(int h)
        => create(h, _ => read.ToCharArray());
    public static int[] ar1D(int n)
        => create(n, _ => num);
    public static long[] arL1D(int n)
        => create(n, _ => numL);
    public static string[] strs(int n)
        => create(n, _ => read);
    public static int[][] ar2D(int n)
        => create(n, _ => ar);
    public static long[][] arL2D(int n)
        => create(n, _ => arL);
    public static List<T>[] edge<T>(int n)
        => create(n, _ => new List<T>());
    public static T GetValue<T>(string g)
    {
        var t = typeof(T);
        if (t == typeof(int))
            return (T)(object)int.Parse(g);
        if (t == typeof(long))
            return (T)(object)long.Parse(g);
        if (t == typeof(string))
            return (T)(object)g;
        if (t == typeof(char))
            return (T)(object)char.Parse(g);
        if (t == typeof(double))
            return (T)(object)double.Parse(g);
        if (t == typeof(bool))
            return (T)(object)bool.Parse(g);
        return default(T);
    }
    public static void Make<T1, T2>(out T1 v1, out T2 v2)
    {
        v1 = Next<T1>();
        v2 = Next<T2>();
    }
    public static void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3)
    {
        Make(out v1, out v2);
        v3 = Next<T3>();
    }
    public static void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4)
    {
        Make(out v1, out v2, out v3);
        v4 = Next<T4>();
    }
    public static void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5)
    {
        Make(out v1, out v2, out v3, out v4);
        v5 = Next<T5>();
    }
    public static void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6)
    {
        Make(out v1, out v2, out v3, out v4, out v5);
        v6 = Next<T6>();
    }
    private static Queue<string> sc;
    public static T Next<T>(){ sc = sc ?? new Queue<string>(); if (sc.Count == 0) foreach (var item in read.Split(' ')) sc.Enqueue(item);return GetValue<T>(sc.Dequeue()); }
    public static void Next<T>(ref T val) => val = Next<T>();
    public const long Inf = (long)1e18;
    public const double eps = 1e-6;
    public const string Alfa = "abcdefghijklmnopqrstuvwxyz";
    public const int MOD = 1000000007;
}

public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1 { get; set; }
    public T2 v2 { get; set; }
    public Pair() { v1 = Input.Next<T1>(); v2 = Input.Next<T2>(); }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString()
        => $"{v1.ToString()} {v2.ToString()}";
    public override bool Equals(object obj)
        => this == (Pair<T1, T2>)obj;
    public override int GetHashCode()
        => v1.GetHashCode() ^ v2.GetHashCode();
    public static bool operator ==(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) == 0;
    public static bool operator !=(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) != 0;
    public static bool operator >(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) == 1;
    public static bool operator >=(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) != -1;
    public static bool operator <(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) == -1;
    public static bool operator <=(Pair<T1, T2> p1, Pair<T1, T2> p2)
        => p1.CompareTo(p2) != 1;
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3 { get; set; }
    public Pair() : base() { v3 = Input.Next<T3>(); }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString()
        => $"{base.ToString()} {v3.ToString()}";
}


public static void FindAVG(int num)
     {

         int sum = 0;
         int tempnum = num;

         for (int i = 2; i < num; i++)
         {
             tempnum = num;
             while (tempnum > 0)
             {
                 sum += tempnum % i;
                 tempnum /= i;
             }
         }

         Console.WriteLine(sum+"/"+(num-2).ToString());
    }


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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int A = Convert.ToInt32(Console.ReadLine());
            Program p = new Program();
            Console.WriteLine(p.Numbers(A));
            Console.ReadLine();
        }

        public void Numbers(int A)
        {
            int i = 0;
            int a1 = 0;
            int a2 = A - 2;

            for (i = 2; i < A; i++)
            {
                a1 += ChangeBase(i, A);
            }

            i = GCD(a1, a2);
            a1 /= i;
            a2 /= i;

            Console.WriteLine(a1 + "/" + a2);
        }

        private int ChangeBase(int b, int A)
        {
            int i = 0;
            int count = 0;
            int[] d = new int[15];

            for (; i < 15 && A >= 1; i++)
            {
                d[i] = A % b;
                A = (int)(A / b);
            }

            for (i = 0; i < 15; i++)
            {
                count += d[i];
            }

            return count;
        }

        private int GCD(int a, int b)
        {
            int g = 0;

            if (b == 0)
            {
                g = a;
            }
            else
            {
                g = GCD(b, a % b);
            }

            return g;
        }
    }
}


class Program{
    static void Main(){
        var n = Int32.Parse(Console.ReadLine());
        Console.WriteLine(n % 2 == 0 ? (long)Math.Pow(2, n / 2) : 0);
    }
}


using System;
class Program{
    static void Main(){
        var n = Int32.Parse(Console.ReadLine());
        Console.WriteLine((long)Math.Pow(2, n / 2))
    }
}


using System;

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

            int numberOfCabinets = 0;

            if (n == 1)
            {
                numberOfCabinets = 2;
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    numberOfCabinets += (int)MathF.Pow(2f, i + 1);
                }
            }

            Console.WriteLine(numberOfCabinets);
        }
    }
}


using System;

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

            float numberOfCabinets = 0;

            for (float i = 0; i < n; i++)
            {
                numberOfCabinets += MathF.Pow(2f, i + 1);
            }

            Console.WriteLine(numberOfCabinets);
        }
    }
}


using System;
class Program{
    public static void Main(string[] args){
        int n = int.Parse(Console.ReadLine());
        int res = 2;
        for(int i = 2; i <= n; i++)
            res += Math.Pow(2,i);
        Console.WriteLine(res);
    }
}


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

namespace codeforces
{
class Program
{

static void Main(string[] args)
{
 n = Convert.ToDouble(Console.ReadLine());
decimal value = 1;
for (int i = 0; i <= n; i++)
{
value *= 2;
}
value -= 2;
Console.WriteLine(value);
}
}
}


using System;

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

            float numberOfCabinets = 0;

            if (n == 1)
            {
                numberOfCabinets = 2;
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    numberOfCabinets += MathF.Pow(2f, i + 1);
                }
            }

            Console.WriteLine(numberOfCabinets);
        }
    }
}


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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;

        static void Main(string[] args)
        {
            /*if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else*/
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            sr.Close();
            sw.Close();
        }

        static void Solve()
        {
            int p = ReadInt();
            int x = ReadInt();
            int y = ReadInt();
            int mint = y;
            while (mint % 50 != x % 50)
            {
                mint++;
            }
            while (mint < x)
            {
                if (Able(getMest(mint), p))
                {
                    sw.WriteLine(0);
                    return;
                }
                mint += 50;
            }
            for (int i = 0; i < 100000; i++)
            {
                if (i==0)
                {
                    if (Able(getmest(mint), p))
                    {
                        sw.WriteLine(i);
                        return;
                    }
                }
                else
                {
                if (Able(getMest(mint), p) || Able(getMest(mint - 50), p))
                {
                    sw.WriteLine(i);
                    return;
                }
                }
                mint += 100;
            }
        }

        static bool Able(int[] a, int b)
        {
            foreach (int i in a)
            {
                if (i == b)
                {
                    return true;
                }
            }
            return false;
        }

        static int[] getMest(int s)
        {
            int[] a = new int[25];
            int i = (s / 50) % 475;
            for (int j = 0; j < 25; j++)
            {
                i = (i * 96 + 42) % 475;
                a[j] = i + 26;
            }
            return a;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static int comparator(Pair<long, long> a, Pair<long, long> b)
        {
            long temp = getManhattan(a, new Pair<long, long>(0, 0)) - getManhattan(b, new Pair<long, long>(0, 0));
            return (temp > 0 ? 1 : (temp<0?-1:0));
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        private int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                temp[a[i] - 1]++;
                temp[b[i] - 1]++;
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                Edges[a[j] - 1][temp[a[j] - 1]] = b[j] - 1;
                Edges[b[j] - 1][temp[b[j] - 1]] = a[j] - 1;
            }
        }
    }

    class Pair<U, V> : IComparable<Pair<U, V>>
         where U : IComparable<U> where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }
}


public class AgainTwentyFive630A
{
    public static void Main(String[] args)
    {
        Console.ReadLine();
        Console.WriteLine("25");
    }
}


int n= 0;
function square (){
console.writeLine("Plesae enter the Input number");
n = console.ReadLine();
for(int i =0;i<n;i++){
int x = 5;
int result = 1;
int result = result * x;
int output = result
Console.writeLine(output);
};
};


public class AgainTwentyFive630A
{
    public static void Main(String[] args)
    {
        Console.WriteLine("25");
    }
}


class Program{
public static void Main(string[] args){
return 25;
}}


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Numerics;

namespace ConsoleApplication1
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;
        private int index = 0;
        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }
        class Cut
        {
            public int a;
            public int b;
            public int line;
        }

        object Get()
        {
            checked
            {
                var n = ReadInt();
                return 25;
            }
        }
        object Get2()
        {
            FileName = "strange";
            checked
            {
                var s = Read();
                var first = GetNext(s);
                var second = GetNext(s);
                var single = new Dictionary<char, int>();
                var twin = new Dictionary<Tuple<char, char>, List<Tuple<long, long>>>();
                single[first.Item1] = first.Item2;
                if (second == null)
                    return first.Item2;
                do
                {
                    if (!single.ContainsKey(second.Item1) || single[second.Item1] < second.Item2)
                        single[second.Item1] = second.Item2;
                    var pair = Tuple.Create(first.Item1, second.Item1);
                    if (!twin.ContainsKey(pair))
                        twin[pair] = new List<Tuple<long, long>>();
                    twin[pair].Add(Tuple.Create((long)first.Item2, (long)second.Item2));
                    first = second;
                    second = GetNext(s);
                } while (second != null);
                long result = single.Select(x => x.Value).Sum();
                foreach (var kv in twin)
                    result += ProcessPair(kv.Value);
                return result;
            }
        }

        public long ProcessPair(List<Tuple<long, long>> counts)
        {
            checked
            {
                var sorted = counts.OrderByDescending(x => x.Item1).ThenByDescending(x => x.Item2).ToArray();
                var filtered = new List<Tuple<long, long>>() { sorted[0] };
                for (int i = 1; i < sorted.Length; i++)
                    if (sorted[i].Item2 > filtered.Last().Item2)
                        filtered.Add(sorted[i]);

                var previous = filtered[0];
                var result = previous.Item1 * previous.Item2;
                for (int i = 1; i < filtered.Count; i++)
                    result += (filtered[i].Item2 - previous.Item2) * filtered[i].Item1;
                return result;
            }
        }

        public Tuple<char, int> GetNext(string s)
        {
            if (index == s.Length)
                return null;
            var ch = s[index];
            var count = 0;
            while (index < s.Length && ch == s[index])
            {
                count++;
                index++;
            }
            return Tuple.Create(ch, count);
        }

        public double ProcessPair(long[] a, long[] b, int p)
        {
            return ((double)NumberOfDivs(a, p) * 2000) / Count(a) +
                ((double)NumberOfDivs(b, p) * 2000) / Count(b) -
                ((double)(NumberOfDivs(a, p) * NumberOfDivs(b, p))) * 2000 / (Count(a) * Count(b));
        }

        public long NumberOfDivs(long[] a, int p)
        {
            return a[1] / p - (a[0] - 1) / p;
        }

        public long Count(long[] a)
        {
            return a[1] - a[0] + 1;
        }

        bool DoubleEquals(double a, double b)
        {
            return Math.Abs(a - b) < 0.0000000001;
        }

        bool SameLine(double[] a, double[] b, double[] c)
        {
            var x = a[0];
            var y = a[1];
            var x1 = b[0];
            var y1 = b[1];
            var x2 = c[0];
            var y2 = c[1];
            return DoubleEquals((x - x1) * (y2 - y1), (y - y1) * (x2 - x1));
        }

        double Distance(double[] a, double[] b)
        {
            return Math.Sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));
        }

        object Get2()
        {
            checked
            {
                var m = ReadInt();
                var p = ReadLongs();
                var arr = p.GroupBy(x => x).Select(g => new { g.Key, Count = g.Count() }).ToArray();
                var even = arr.Where(x => (x.Count & 1) == 0).FirstOrDefault();
                if (even != null)
                {
                    var index = Array.IndexOf(arr, even);
                    //arr[index].Count = arr[index].Count / 2;
                }
                long divs = 1;
                long result = 1;
                foreach (var a in arr)
                {
                    var pi = a.Key;
                    var curr = pi;
                    var olddivs = divs;
                    var oldres = result;
                    for (int i = 0; i < a.Count; i++)
                    {
                        result = (result * oldres % commonMod) * FastPow(curr, olddivs, commonMod) % commonMod;
                        curr = curr * pi % commonMod;
                        divs = (divs + olddivs) % (commonMod - 1);
                    }
                }
                return result;
            }
        }

        public long FastPow(long x, BigInteger pow, long mod)
        {
            if (pow == 0)
                return 1;
            if ((pow & 1) == 0)
                return FastPow(x * x % mod, pow / 2, mod);
            return x * FastPow(x, pow - 1, mod) % mod;
        }

        //object Get3()
        //{
        //    FileName = "";
        //    checked
        //    {
        //        var n = ReadInt();
        //        var hor = new List<Cut>();
        //        var ver = new List<Cut>();
        //        for (int i = 0; i < n; i++)
        //        {
        //            var a = ReadInts();
        //            if (a[0] == a[2])
        //                ver.Add(new Cut() { a = Math.Min(a[1], a[3]), b = Math.Max(a[1], a[3]), line = a[0] });
        //            else
        //                hor.Add(new Cut() { a = Math.Min(a[0], a[2]), b = Math.Max(a[0], a[2]), line = a[1] });
        //        }
        //        ver = Merge(ver);
        //        hor = Merge(hor);

        //    }
        //}

        List<Cut> Merge(List<Cut> l)
        {
            var a = l.OrderBy(x => x.line).ThenBy(x => x.a).ToArray();
            Cut previous = null;
            var result = new List<Cut>();
            for (int i = 0; i < a.Length; i++)
                if (previous == null)
                    previous = a[i];
                else
                    if (previous.line == a[i].line && previous.b >= a[i].a)
                        previous.b = Math.Max(previous.b, a[i].b);
                    else
                    {
                        result.Add(previous);
                        previous = a[i];
                    }
            if (previous != null)
                result.Add(previous);
            return result;
        }

    }
    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (string.IsNullOrEmpty(FileName))
                return Console.ReadLine();
            if (f == null)
                f = new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName + ".in");
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return Convert.ToInt32(Read());
        }
        protected int[] ReadInts()
        {
            return Read().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            return Read().Split(' ').Select(x => Convert.ToInt64(x)).ToArray();
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName + ".out", r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {
            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-NB-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func)
        {
            T result = default(T);
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }
    }
}


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

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

            Console.WriteLine("25");
        }
    }
}


int n= 0;
function square (){
console.writeLine("Plesae enter the Input number");
n = console.ReadLine();
for(int i =0;i<n;i++){
int x = 5;
int result = 1;
int result = result * x;
int output = result

};
Console.writeLine(output);
};


using System;
class Codeforces_630A
{
    static void Main()
    {
        string n = Console.ReadLine();
        Console.Write(25);
    }


class Program
	{
		static void Main(string[] args)
		{
			Console.WriteLine(25);
		}
	}


using System;
class Program {
    public static void Main(string[] args) {
        Console.ReadLine();
        return 25;
    }
}


using System;
class Program{
    public static void Main(string[] args){
        long n = long.Parse(Console.ReadLine());
        ulong res = 0;
        for(int i = 1; i <= n; i++)
            res += 6 * i;
        Console.WriteLine(res);
    }
}


using System;
class Program{
    public static void Main(string[] args){
        long n = long.Parse(Console.ReadLine());
        ulong res = 0;
        for(int i = 1; i <= n; i++)
            res += (ulong)6 * i;
        Console.WriteLine(res);
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JogandoDado", "JogandoDado\JogandoDado.csproj", "{8BD600EA-D66D-4028-ACEF-590E39A3970F}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{8BD600EA-D66D-4028-ACEF-590E39A3970F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{8BD600EA-D66D-4028-ACEF-590E39A3970F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{8BD600EA-D66D-4028-ACEF-590E39A3970F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{8BD600EA-D66D-4028-ACEF-590E39A3970F}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> karta = new List<int>(); List<int> itogi = new List<int>();
            string stroka = ""; ; string konec = ""; int a = 2; int itog = 0; int kol = 0; int dnei = 0; long y = 1; long minut = 0; string konec2 = ""; long[] strochenka = { 0, 0 }; List<long> str = new List<long>();
            konec = Console.ReadLine();
            string[] split = konec.Split(new Char[] { ' ' });
            foreach (string s in split)
            {
                karta.Add(Convert.ToInt32(s));
            }
            karta.Sort();
            itog = karta.Sum();
            dnei = karta.Sum();
            foreach (int e in karta)
            {
                foreach (int t in karta)
                {
                    if (t == e)
                    {
                        a--;
                        if(a>=0)
                        itog -= t;
                    }
                }
                if(a<1)
                itogi.Add(itog);
                a = 2;
                itog = karta.Sum();

            }
            if (itogi.Count > 0)
                dnei = itogi.Min();
            Console.WriteLine(dnei);

        }
    }
}


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{CDB32670-23CF-4D55-8B01-E9508F2B3E5F}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{CDB32670-23CF-4D55-8B01-E9508F2B3E5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{CDB32670-23CF-4D55-8B01-E9508F2B3E5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{CDB32670-23CF-4D55-8B01-E9508F2B3E5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{CDB32670-23CF-4D55-8B01-E9508F2B3E5F}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


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

class A680 {
    public static void Main() {
        var a = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
        var b = new Dictionary<int, int>();
        foreach (var i in a) {
            b.TryGetValue(i, out int v);
            b[i] = v + 1;
        }
        int max = 0;
        foreach (var i in b)
            if (2 <= i.Value)
                max = Math.Max(max, Math.Min(i.Value, 3) * i.Key);
        Console.WriteLine(a.Sum() - max);
    }
}


using System;
using System.Text;
using System.Linq;

class Program
{
static void Main()
{
string s1 = Console.ReadLine();
int n = int.Parse(s1.Split(' ')[0]) - 1;
int win = -1;
int z0 = int.Parse(s1.Split(' ')[1]) - 1;
int c0 = int.Parse(s1.Split(' ')[2]) - 1;

string s2 = Console.ReadLine();

string s3 = Console.ReadLine();

for (int i=0 i<s3.Length; i++)
{

    if (s3[i] == '0')
    {
        if (s2 == "to tail")
            if (c0 != 0)
                z0 = 0;
            else
                z0 = n;
        else
            if (c0 != n)
                z0 = n;
            else
                z0 = 0;
    }
    else
    {
        if (z0 > c0)
        {
            if (z0 != n)
                z0++;
        }
        else
        {
            if (z0 != 0)
                z0--;
        }
    }
    peremesh(n, c0, ref s2, out c0);

    if (c0 == z0)
    {
        Console.WriteLine("Controller");
        win = 1;
        break;
    }
}
if (win != 1)
Console.WriteLine("Stowaway");

Console.ReadKey();

}

static void peremesh(int n, int place, ref string dir, out int N)
{
N = -1;
if (dir == "to tail")
{
if (place < n)
place++;
else
{
dir = "to head";
place--;
}
}
else
if (place > 0)
place--;
else
{
dir = "to tail";
place++;
}
}
}


using System;
using System.Text;
using System.Linq;

class Program
{
static void Main()
{
string s1 = Console.ReadLine();
int n = int.Parse(s1.Split(' ')[0]) - 1;
int win = -1;
int z0 = int.Parse(s1.Split(' ')[1]) - 1;
int c0 = int.Parse(s1.Split(' ')[2]) - 1;

string s2 = Console.ReadLine();

string s3 = Console.ReadLine();

for (int i=0; i<s3.Length; i++)
{
    if (s3[i] == '0')
    {
        z0 = -1;

        peremesh(n, c0, ref s2, out c0);

        if (s2 == "to tail")
            if (c0 != 0)
                z0 = 0;
            else
                z0 = n;
        else
            if (c0 != n)
                z0 = n;
            else
                z0 = 0;
    }
    else
    {
        if (z0 > c0)
        {
            if (z0 != n)
                z0++;
        }
        else
        {
            if (z0 != 0)
                z0--;
        }
    }

    if (s3[i] != '0')
        peremesh(n, c0, ref s2, out c0)'

    if (c0 == z0)
    {
        Console.WriteLine("Controller");
        win = 1;
        break;
    }
}
if (win != 1)
Console.WriteLine("Stowaway");

Console.ReadKey();

}

static void peremesh(int n, int place, ref string dir, out int N)
{
N = -1;
if (dir == "to tail")
{
if (place < n)
place++;
else
{
dir = "to head";
place--;
}
}
else
if (place > 0)
place--;
else
{
dir = "to tail";
place++;
}
}
}


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

namespace DTATest
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] line = Console.ReadLine().Split(' ');
			long n;
			long m;
			long k;
			n = long.Parse(line[0]);
			m = long.Parse(line[1]);
			k = long.Parse(line[2]);
			Console.WriteLine(solve(n, m, k));
            Console.Read();

        }

		private long solve(long n, long m, long k)
		{
			long mod = 1000000007;
			if (k == -1 && (m + n) % 2 != 0) {
				return 0;
			} else {
				long a = 2;
				a = qMul(a, n - 1, mod);
				a = qMul(a, m - 1, mod);
				return a;
			}
		}

		private long qMul(long a, long b, long m)
		{
			a %= m;
			long ans = 1;
			while (b != 0) {
				if (b % 2 == 1) {
					ans = (ans * a) % m;
				}
				a = (a * a) % m;
				b >>= 1;
			}
			return ans;
		}
    }
}


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

class Program
{
	static void Main()
	{
		string[] nmk = Console.ReadLine().Split();
		Console.WriteLine(BigInteger.ModPow(2, (new BigInteger(nmk[0].ToCharArray()) - 1) * (new BigInteger(nmk[1].ToCharArray()) - 1), 1000000007));
	}
}


using System;
namespace b
{
    static class Program
    {
        static ulong fastPow(ulong a, ulong exp, uint mod) {
            a %= mod;
            ulong result = 1;
            while (exp > 0) {
                if ((exp & 1) != 0) result = (result * a) % mod;
                a = (a * a) % mod;
                exp >>= 1;
            }
            return result;
        }
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            var (n, m, prod) = (ulong.Parse(input[0]), ulong.Parse(input[1]), long.Parse(input[2]));
            if (n % 2 != m % 2 && prod == -1){
                System.Console.WriteLine(0);
                return;
            }
            System.Console.WriteLine(fastPow(2, (n-1)*(m-1), 1000000007));
        }
    }
}


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

namespace DTATest
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] line = Console.ReadLine().Split(' ');
			long n;
			long m;
			long k;
			n = long.Parse(line[0]);
			m = long.Parse(line[1]);
			k = long.Parse(line[2]);
			Console.WriteLine(solve(n, m, k));
            Console.Read();

        }

		long solve(long n, long m, long k)
		{
			long mod = 1000000007;
			if (k == -1 && (m + n) % 2 != 0) {
				return 0;
			} else {
				long a = 2;
				a = qMul(a, n - 1, mod);
				a = qMul(a, m - 1, mod);
				return a;
			}
		}

		long qMul(long a, long b, long m)
		{
			a %= m;
			long ans = 1;
			while (b != 0) {
				if (b % 2 == 1) {
					ans = (ans * a) % m;
				}
				a = (a * a) % m;
				b >>= 1;
			}
			return ans;
		}
    }
}


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

namespace ConsoleApplication6
{
    class Program
    {
        public static long NOD(long a, long b)
        {
            while (b != 0)
                b = a % (a = b);
            return a;
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] s1 = s.Split(' ');
            long l = long.Parse(s1[0]);
            long r = long.Parse(s1[1]);
            for (long i = l; i<=r;i++)
                for (long j = l+1;j<=r;j++)
                    for (long k = l+2;k<=r;k++)
                    {
                        if ((NOD(i,k)!=1)&&(NOD(i,j)==1)&&(NOD(j,k)==1))
                        {
                            Console.WriteLine("{0} {1} {2}",i,j,k);
                            return;
                        }
                    }
            if (!a) Console.WriteLine("-1");
        }
    }
}


using System;

namespace FINDBESTHOUSE
{
    class Program
    {
        static void Main(string[] args)
        {
            int result = 0;
            string GetInfo = "";
            GetInfo = Console.Read();
            string[] SplitedInfo = GetInfo.Split(' ');
            int AmoutofHouse = Convert.ToInt32(SplitedInfo[0]);
            int GFLocation = Convert.ToInt32(SplitedInfo[1]) - 1;
            int YourMoney = Convert.ToInt32(SplitedInfo[2]);
            int[] Finding = new int[AmoutofHouse];
            for (var j = 0; j < AmoutofHouse; j++)
            {
                int test = Convert.ToInt32(SplitedInfo[3 + j]);
                if (test == 0)
                {
                    Finding[j] = 0;
                }
                else if (YourMoney > test)
                {
                    Finding[j] = 1;
                }
                else
                {
                    Finding[j] = 0;
                }
            }
            int Checker = 1;
            int get1 = 1, get2 = 1;
            int i = 0;
            do
            {
                i++;
                try
                {
                    if (Finding[GFLocation - i] == 0)
                    {
                        continue;
                    }
                    else if (Finding[GFLocation - i] == 1)
                    {
                        get1 = i;
                        break;
                    }
                    else
                    {
                        get1 = 0;
                    }
                }
                catch
                {
                    get1 = 0;
                    break;
                }
            }
            while (Checker == 1);
            Checker = 1;
            i = 0;
            do
            {
                i++;
                try
                {
                    if (Finding[GFLocation + i] == 0)
                    {
                        continue;
                    }
                    else if (Finding[GFLocation + i] == 1)
                    {
                        get2 = i;
                        break;
                    }
                    else
                    {
                        get2 = 0;
                    }
                }
                catch
                {
                    get2 = 0;
                    break;
                }
            }
            while (Checker == 1);
            if (get1 == 0)
            {
                result = get2;
            }
            else if (get2 == 0)
            {
                result = get1;
            }
            else
            {
                result = get1 > get2 ? get2 : get1;
            }
            Console.WriteLine(result * 10);

        }
    }
}


using System;
using System.IO;
namespace FINDBESTHOUSE
{
    class Program
    {
        //static string Inputpath = @"C:\Users\PC\Desktop\InfoHouse.txt";
        static void Main(string[] args)
        {
            int result = 0;
            string GetInfo = File.ReadAllText(Inputpath);
            string[] SplitedInfo = GetInfo.Split(' ');
            int AmoutofHouse = Convert.ToInt32(SplitedInfo[0]);
            int GFLocation = Convert.ToInt32(SplitedInfo[1]) - 1;
            int YourMoney = Convert.ToInt32(SplitedInfo[2]);
            int[] Finding = new int[AmoutofHouse];
            for (var j = 0; j < AmoutofHouse ; j++)
            {
                int test = Convert.ToInt32(SplitedInfo[3 + j]);
                if (test == 0)
                {
                    Finding[j] = 0;
                }
                else if (YourMoney > test)
                {
                    Finding[j] = 1;
                }
                else
                {
                    Finding[j] = 0;
                }
            }
            int Checker = 1;
            int get1 = 1, get2 = 1;
            int i = 0;
            do
            {
                i++;
                try
                {
                    if (Finding[GFLocation - i] == 0)
                    {
                        continue;
                    }
                    else if (Finding[GFLocation - i] == 1)
                    {
                        get1 = i;
                        break;
                    }
                    else
                    {
                        get1 = 0;
                    }
                }
                catch
                {
                    get1 = 0;
                    break;
                }
            }
            while (Checker == 1);
            Checker = 1;
            i = 0;
            do
            {
                i++;
                try
                {
                    if (Finding[GFLocation + i] == 0)
                    {
                        continue;
                    }
                    else if (Finding[GFLocation + i] == 1)
                    {
                        get2 = i;
                        break;
                    }
                    else
                    {
                        get2 = 0;
                    }
                }
                catch
                {
                    get2 = 0;
                    break;
                }
            }
            while (Checker == 1);
            if (get1 == 0)
            {
                result = get2;
            }
            else if (get2 == 0)
            {
                result = get1;
            }
            else
            {
                result = get1 > get2 ? get2 : get1;
            }
            Console.WriteLine(result * 10);

        }
    }
}