using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string num = Console.ReadLine();
            char[] arr;
            arr = num.ToCharArray(0, num.Length);
            num = Console.ReadLine();
            char[] arr2;
            arr2 = num.ToCharArray(0, num.Length);

            if (arr.Length == arr2.Length)
            {

                for (int i = 0; i < arr.Length; i++)
                {
                    for (int j = i + 1; j < arr.Length; j++)
                    {
                        if (arr[i] > arr[j] && (i != 0 || arr[j] != '0'))
                        {
                            char p = arr[i];
                            arr[i] = arr[j];
                            arr[j] = p;
                        }
                    }
                }
                int flag = 0;
                for (int k = 0; k < arr.Length; k++)
                {
                    if (arr[k] != arr2[k])
                    {
                        flag = 1;
                        break;
                    }
                }

                if (flag == 1)
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
                else
                {
                    Console.WriteLine("OK");
                }
            }
            else
            {
                Console.WriteLine("WRONG_ANSWER");
            }
         }
    }
}

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

namespace acm{
    class Program{
#if DEBUG
        static bool file = true;
        static TextReader fin = new StreamReader("input.txt");
        static TextWriter fout = new StreamWriter("output.txt");
        static void open(bool f) { if (f) { Console.SetIn(fin); Console.SetOut(fout);  } }
        static void close(bool f) { if (f) fout.Close(); }
#endif
        static void swap<T>(ref T a, ref T b) { T t = a; a = b; b = t; }
        static void print(object o) { Console.Write(o); }
        static void print(String f, params object[] o) { Console.WriteLine(f, o); }
        static void println() { Console.WriteLine(); }
        static void println(object o) { Console.WriteLine(o); }
        static void println(String f, params object[] o) { Console.WriteLine(f, o); }
        static string RL() { return Console.ReadLine(); }

        static void Main(string[] args) {
#if DEBUG
            open(file);
#endif
			string n1=Console.ReadLine().Trim(), n2=Console.ReadLine().Trim();
			int[] digits=new int[n1.Length];

			if (n1.Length!=n2.Length){
				println("WRONG_ANSWER");
				return;
			}

			for(int i=0; i<n1.Length; i++){
				digits[i]=int.Parse(""+n1[i]);
			}

			Array.Sort(digits);

			if (digits[0]!=0){
				string t="";
				foreach(int v in digits) t+=v.ToString();
				if (t==n2) println("OK");
				else println("WRONG_ANSWER");
			} else {
				int k=0;
				for(int i=1; i<digits.Length; i++){
					if (digits[i]!=0){
						k=i;
						break;
					}
				}
				swap(ref digits[0], ref digits[k]);
				string t="";
				foreach(int v in digits) t+=v.ToString();
				if (t==n2) println("OK");
				else println("WRONG_ANSWER");
			}

#if DEBUG
            close(file);
#endif
        }
    }
}

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

namespace Contest12.Q2
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().ToCharArray();
            var keys = new int[10];
            for (int i = 0; i < 10; i++)
            {
                keys[i] = 0;
            }
            for (int i = 0; i < line.Length; i++)
            {
                keys[line[i] - '0']++;
            }
            var min = 0;
            for (int i = 1; i < 10; i++)
            {
                if (keys[i] <= 0) continue;

                min = i;
                break;
            }

            keys[min]--;

            var str = new StringBuilder(line.Length);
            str.Append((char)(min+'0'));

            for (int i = 0; i < 10; i++)
            {
                if (keys[i]>0)
                {
                    str.Append(new string((char)(i + '0'), keys[i]));
                }
            }

            var line2 = Console.ReadLine();
            if (line2==str.ToString())
            {
                Console.WriteLine("OK");
            }
            else
            {
                Console.WriteLine("WRONG_ANSWER");
            }
        }
    }
}

using System;
using System.Linq;
static class P {
    static void Main() {
        string n = Console.ReadLine(), m = Console.ReadLine(), r = get_min_num(n);
        Console.WriteLine(r == m ? "OK" : "WRONG_ANSWER");
    }
    static string get_min_num(string num) {
        var a = num.ToArray(); Array.Sort(a); int i = 0;
        while (a[i++] == '0' && i < a.Length) ;
        if (--i != 0) { var t = a[0]; a[0] = a[i]; a[i] = t; }
        return string.Join("", a);
    }
}

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

namespace code_20
{
    class Program
    {
        static void Main(string[] args)
        {
            string s =Console.ReadLine();
            string ss =Console.ReadLine();
            int[] mas = new int[s.Length];
            int[] mas2 = new int[s.Length];
            if (s.Length != ss.Length) Console.WriteLine("WRONG_ANSWER");
            else
            {
                for (int i = 0; i < s.Length; i++)
                    mas[i] = int.Parse(s[i].ToString());

                for (int i = 0; i < s.Length; i++)
                    mas2[i] = int.Parse(ss[i].ToString());
                Array.Sort(mas);
                if (mas[0] == 0)
                    for (int i = 1; i < s.Length; i++)
                        if (mas[i] != 0)
                        {
                            mas[0] = mas[i];
                            mas[i] = 0;
                            break;
                        }
                bool b = false;
                for (int i = 0; i < s.Length; i++)
                    if (mas[i] != mas2[i])
                    {
                        b = true;
                        break;
                    }
                if (!b) Console.WriteLine("OK");
                else Console.WriteLine("WRONG_ANSWER");
            }
        }
    }
}

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

namespace CodeForces
{
    class Tokenizer
    {
        TextReader reader;
        TextWriter writer;
        string[] tokens;
        int cur;

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

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

        public string NextString()
        {
            while (tokens == null || cur >= tokens.Length)
            {
                tokens = NextLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                cur = 0;
            }
            return tokens[cur++];
        }

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

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

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

    class Program
    {
        Tokenizer t;

        string get()
        {
            char[] temp = t.NextString().ToCharArray();
            Array.Sort(temp);
            if (temp[0] == '0')
            {
                int i;
                for (i = 1; i < temp.Length; i++)
                    if (temp[i] != '0')
                        break;
                if (i < temp.Length)
                {
                    char tp = temp[0];
                    temp[0] = temp[i];
                    temp[i] = tp;
                }
            }
            return new string(temp);
        }

        public void Solve()
        {
            //TextReader reader = File.OpenText(@"../../in.txt");
            //t = new Tokenizer(reader);
            t = new Tokenizer(Console.In);

            string exp = get();
            string ans = t.NextString();
            Console.WriteLine(ans == exp ? "OK" : "WRONG_ANSWER");
        }

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

    }
}

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

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

        private static void Main(string[] args)
        {
            char[] n = reader.ReadLine().ToCharArray();
            string m = reader.ReadLine();

            Array.Sort(n);
            if (n[0] == '0')
            {
                for (int i = 0; i < n.Length; i++)
                {
                    if (n[i] != '0')
                    {
                        n[0] = n[i];
                        n[i] = '0';
                        break;
                    }
                }
            }

            writer.WriteLine(m == new string(n) ? "OK" : "WRONG_ANSWER");
            writer.Flush();
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string input = Console.ReadLine();
            string output = Console.ReadLine();
            if (input.Length != output.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
                goto State;
            }
            int b = int.Parse(input);
            int[] a = new int[input.Length];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = b % 10;
                b = b / 10;
            }
            BubbleSort(ref a);
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] > 0)
                {
                    int temp = a[i];
                    a[i] = a[0];
                    a[0] = temp;
                    break;
                }
            }
            int x = 0;
            for (int i = 0; i < a.Length; i++)
            {
                x = x * 10 + a[i];
            }
            if (x == int.Parse(output)) { Console.WriteLine("OK"); }
            else { Console.WriteLine("WRONG_ANSWER"); }
        State:
            ;
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

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

namespace b12b
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var val = Console.ReadLine();
            if (val == "0")
            {
                var se = Console.ReadLine();
                if (se == "0")
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }

                return;
            }

            var cs = new int[10];
            for (int i = 0; i < val.Length; i++)
            {
                var next = -48 + (int)val[i];
                cs[next]++;
            }

            var ans = new StringBuilder();
            var first = true;
            for (int i = 1; i < 10; i++)
            {
                if (cs[i] > 0)
                {
                    ans.Append(i);
                    cs[i]--;

                    if (first)
                    {
                        for (int z = 0; z < cs[0]; z++)
                        {
                            ans.Append("0");
                        }
                        first = false;
                    }
                }

                for (int j = 0; j < cs[i]; j++)
                {
                    ans.Append(i);
                }
            }

            var res = Console.ReadLine();
            if (ans.Length != res.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
                return;
            }

            for (int i = 0; i < res.Length; i++)
            {
                if (ans[i] != res[i])
                {
                    Console.WriteLine("WRONG_ANSWER");
                    return;
                }
            }

            Console.WriteLine("OK");
            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

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

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

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}

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

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

            if(Math.Floor(Math.Log10(n)) != Math.Floor(Math.Log10(m)) || a.Length != b.Length )
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                List<int> digits = new List<int>();
                while(n > 0)
                {
                    digits.Add(n % 10);
                    n /= 10;
                }

                digits.Sort();

                int x = 0;
                int zeroStop = 0;
                for(zeroStop = 0; zeroStop < digits.Count; ++zeroStop)
                {
                    if(digits[zeroStop] != 0)
                    {
                        break;
                    }
                }

                if(zeroStop == digits.Count)
                {
                    if (m == 0)
                        Console.WriteLine("OK");
                    else
                        Console.WriteLine("WRONG_ANSWER");
                }
                else
                {
                    x += digits[zeroStop];
                    for (int i = 0; i < zeroStop; ++i)
                        x *= 10;
                    for(int i = zeroStop + 1; i < digits.Count; ++i)
                    {
                        x *= 10;
                        x += digits[i];
                    }

                    if (x != m)
                        Console.WriteLine("WRONG_ANSWER");
                    else
                        Console.WriteLine("OK");
                }

            }
        }
    }
}

using System;
using System.Globalization;
using System.IO;
using System.Linq;

namespace CF317
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
				//using (var sw = new StreamWriter("output.txt"))
			{
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var s1 = sr.NextString().ToCharArray();
			var s2 = sr.NextString().ToCharArray();
			if (s2.Length != s1.Length) {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			if (s1[0] == '0' && s1.Length == 1) {
				if (s2[0] == '0')
					sw.WriteLine("OK");
				else
					sw.WriteLine("WRONG_ANSWER");
				return;
			}
			Array.Sort(s1);
			var myAnsw = new char[s1.Length];
			var indx = 0;
			while (indx < s1.Length && s1[indx] == '0')
				indx++;

			var answIndx = 1;
			myAnsw[0] = s1[indx];
			for (var i = 0; i < s1.Length; i++) {
				if (i != indx) {
					myAnsw[answIndx] = s1[i];
					answIndx++;
				}
			}
			for (var i = 0; i < myAnsw.Length; i++) {
				if (s2[i] != myAnsw[i]) {
					sw.WriteLine("WRONG_ANSWER");
					return;
				}
			}

			sw.WriteLine("OK");
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
			.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
			.Select(s => func(s, CultureInfo.InvariantCulture))
			.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
			str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
				.Select(s => func(s, CultureInfo.InvariantCulture))
				.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose) {
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            bool flag = false;
            if (num.Length != 1 && num[0] == 0)
            {
                for (int i = 0; i < num.Length; i++)
                {
                    if (num[i] == 0)
                        flag = true;
                    else if (num[i] != 0 && flag)
                    {
                        num[0] = num[i];
                        num[i] = 0;
                        flag = false;
                    }
                    else
                        break;
                }
            }
            string res = "";
            for (int i = 0; i < num.Length; i++)
                res += num[i].ToString();
            Console.WriteLine(((s1 == res)) && !flag ? "OK" : "WRONG_ANSWER");
            Console.ReadLine();
        }
    }
}

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

namespace Task1
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputStr = "";
            var inputStrCheck = "";
            do
            {
                inputStr = Console.ReadLine();
                if (string.IsNullOrEmpty(inputStr) || !inputStr.Any(char.IsNumber))
                    continue;
                inputStrCheck = Console.ReadLine();
                if (string.IsNullOrEmpty(inputStrCheck) || !inputStrCheck.Any(char.IsNumber))
                    continue;

                break;
            } while (true);

            var input = inputStr.ToCharArray().Select(c => int.Parse(c.ToString())).OrderBy(i => i).ToArray();
            if (input[0] == 0)
            {
                for (int i = 0; i < input.Length; i++)
                {
                    if (input[i] != 0)
                    {
                        int tmp = input[i];
                        input[i] = 0;
                        input[0] = tmp;
                        break;
                    }
                }
            }
            inputStr = "";
            input.Select(i => inputStr += i).ToArray();
            Console.WriteLine((inputStr == inputStrCheck ? "OK" : "WRONG_ANSWER"));
            Console.ReadLine();
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string num = Console.ReadLine();
            char[] arr;
            arr = num.ToCharArray(0, num.Length);
            num = Console.ReadLine();
            char[] arr2;
            arr2 = num.ToCharArray(0, num.Length);

            if (arr.Length == arr2.Length)
            {

                for (int i = 0; i < arr.Length; i++)
                {
                    for (int j = i + 1; j < arr.Length; j++)
                    {
                        if (arr[i] > arr[j] && (i != 0 || arr[j] != '0'))
                        {
                            char p = arr[i];
                            arr[i] = arr[j];
                            arr[j] = p;
                        }
                    }
                }
                int flag = 0;
                for (int k = 0; k < arr.Length; k++)
                {
                    if (arr[k] != arr2[k])
                    {
                        flag = 1;
                    }
                }

                if (flag == 1)
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
                else
                {
                    Console.WriteLine("OK");
                }
            }
            else
            {
                Console.WriteLine("WRONG_ANSWER");
            }
         }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            Program p = new Program();

            string a = Console.ReadLine();
            string b = Console.ReadLine();

            Console.WriteLine(p.CorrectAnswer(a, b));
            Console.ReadLine();
        }

        public string CorrectAnswer(string ask, string answer)
        {
            int i = 0;
            int temp = 0;
            string m = "";
            int[] ans = new int[ask.Length];

            for (i = 0; i < ask.Length; i++)
            {
                ans[i] = ask[i] - '0';
            }
            Array.Sort(ans);

            for (i = 0; i < ask.Length; i++)
            {
                if (ans[i] > 0)
                {
                    temp = ans[i];
                    ans[i] = ans[0];
                    ans[0] = temp;

                    break;
                }
            }
            for (i = 0; i < ask.Length; i++)
            {
                m += ans[i];
            }

            return m == answer ? "OK" : "WRONG_ANSWER";
        }
    }
}

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

namespace SRM.Hawaii
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            char[] inp = a.ToCharArray();
            Array.Sort(inp);
            int i = 0;
            while (i<inp.Length && inp[i] == '0')
                i++;
            if (i < inp.Length)
            {
                char t = inp[i];
                inp[i] = inp[0];
                inp[0] = t;
            }
            string c = "";
            for (int j = 0; j < inp.Length; ++j)
            {
                c += inp[j];
            }
            if (string.Compare(b, c, true) == 0)
                Console.WriteLine("OK");
            else
                Console.WriteLine("WRONG_ANSWER");
        }
    }
}

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

namespace ProblemSolving.CodeForces
{
    class Problem12B
    {
        public static void Main()
        {
            string problem = Console.ReadLine();
            string solutionCandidate = Console.ReadLine();
            Console.WriteLine(solutionCandidate == Solution(problem) ? "OK" : "WRONG_ANSWER");
        }

        public static string Solution(string input)
        {
            if (int.Parse(input) == 0)
            {
                return "0";
            }
            else
            {
                List<int> numbers =
                    input.ToList<char>()
                    .Select<char, int>(x => int.Parse(x.ToString()))
                    .ToList();

                numbers.Sort();

                int i = 0;
                while (numbers[i] == 0)
                {
                    i += 1;
                }

                int leading = numbers[i];
                numbers.Remove(leading);

                return leading.ToString() + string.Concat(numbers.Select(x => x.ToString()));
            }
        }
    }
}

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

namespace Codeforces.TaskB
{
    public class Task
    {
        void Solve()
        {
            Input.Next(out long n);
            Input.Next(out string m);

            var ns = n.ToString();
            var ni = new List<int>();
            for (int i = 0; i < ns.Length; i++)
            {
                ni.Add(int.Parse($"{ns[i]}"));
            }

            ni.Sort();
            var numbers = ni.Distinct();
            var min = numbers.First();
            if (min == 0) //0123456789
            {
                if (numbers.Count() <= 1)
                {
                    if (n.ToString() == m) // 0 0
                    {
                        Console.WriteLine("OK");
                    }
                    else // 0 00
                    {
                        Console.WriteLine("WRONG_ANSWER");
                    }
                    return;
                }

                var secondMin = numbers.Skip(1).First();
                StringBuilder sb = new StringBuilder();
                sb.Append(secondMin);
                sb.Append('0', ni.Count(i => i == 0));
                sb.Append(secondMin.ToString()[0], ni.Count(i => i == secondMin) - 1);
                sb.Append(string.Join("", ni.Where(i => i != 0 && i != secondMin).OrderBy(i => i)));

                if (sb.ToString() == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else //123456789
            {
                if (string.Join("", ni) == m)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }

        public static void Main()
        {
            var task = new Task();
            #if DEBUG
            task.Solve();
            #else
            try
            {
                task.Solve();
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex);
            }
            #endif
        }
    }
}

namespace Codeforces
{
    public class Input
    {
        private static string _line;

        public static bool Next()
        {
            _line = Console.ReadLine();
            return _line != null;
        }

        public static bool Next(out long a)
        {
            var ok = Next();
            a = ok ? long.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out long a, out long b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out long a, out long b, out long c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d, out long e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a)
        {
            var ok = Next();
            a = ok ? int.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out int a, out int b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out int a, out int b, out int c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e, out int f)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
                f = array[5];
            }
            else
            {
                a = b = c = d = e = f = 0;
            }
            return ok;
        }

        public static IEnumerable<long> ArrayLong()
        {
            return !Next() ? new List<long>() : _line.Split().Select(long.Parse);
        }

        public static IEnumerable<int> ArrayInt()
        {
            return !Next() ? new List<int>() : _line.Split().Select(int.Parse);
        }

        public static bool Next(out string value)
        {
            value = string.Empty;
            if (!Next()) return false;
            value = _line;
            return true;
        }
    }

    public class DisjointSet
    {
        private readonly int[] _parent;
        private readonly int[] _rank;
        public int Count { get; private set; }

        public DisjointSet(int count, int initialize = 0)
        {
            Count = count;
            _parent = new int[Count];
            _rank = new int[Count];
            for (var i = 0; i < initialize; i++) _parent[i] = i;
        }

        private DisjointSet(int count, int[] parent, int[] rank)
        {
            Count = count;
            _parent = parent;
            _rank = rank;
        }

        public void Add(int v)
        {
            _parent[v] = v;
            _rank[v] = 0;
        }

        public int Find_Recursive(int v)
        {
            if (_parent[v] == v) return v;
            return _parent[v] = Find(_parent[v]);
        }

        public int Find(int v)
        {
            if (_parent[v] == v) return v;
            var last = v;
            while (_parent[last] != last) last = _parent[last];
            while (_parent[v] != v)
            {
                var t = _parent[v];
                _parent[v] = last;
                v = t;
            }
            return last;
        }

        public int this[int v]
        {
            get { return Find(v); }
            set { Union(v, value); }
        }

        public void Union(int a, int b)
        {
            a = Find(a);
            b = Find(b);
            if (a == b) return;
            if (_rank[a] < _rank[b])
            {
                var t = _rank[a];
                _rank[a] = _rank[b];
                _rank[b] = t;
            }
            _parent[b] = a;
            if (_rank[a] == _rank[b]) _rank[a]++;
        }

        public int GetSetCount()
        {
            var result = 0;
            for (var i = 0; i < Count; i++)
            {
                if (_parent[i] == i) result++;
            }
            return result;
        }

        public DisjointSet Clone()
        {
            var rank = new int[Count];
            _rank.CopyTo(rank, 0);
            var parent = new int[Count];
            _parent.CopyTo(parent, 0);
            return new DisjointSet(Count, parent, rank);
        }

        public override string ToString()
        {
            return string.Join(",", _parent.Take(50));
        }
    }

    public class Matrix
    {
        public static Matrix Create(int i, int j)
        {
            var m = new Matrix(i, j);
            return m;
        }

        public static Matrix Create(int i)
        {
            var m = new Matrix(i, i);
            return m;
        }

        public long Modulo { get; set; }

        private readonly int _width;
        private readonly int _height;
        private readonly long[,] _data;
        public int Width { get { return _width; } }
        public int Height { get { return _height; } }

        private Matrix(int i, int j)
        {
            Modulo = 1000000000000000000L;
            _width = j;
            _height = i;
            _data = new long[_height, _width];
        }

        public static Matrix operator *(Matrix m1, Matrix m2)
        {
            if (m1.Width != m2.Height) throw new InvalidDataException("m1.Width != m2.Height");
            var m = Create(m2.Width, m1.Height);
            m.Modulo = m1.Modulo;
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                {
                    for (var k = 0; k < m1.Width; k++)
                        m[j, i] += (m1[j, k] * m2[k, i]) % m1.Modulo;
                    m[j, i] %= m1.Modulo;
                }
            return m;
        }

        public static Matrix operator +(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] + m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator -(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] - m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator *(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] * l) % m.Modulo;
            return m;
        }

        public static Matrix operator *(long l, Matrix m1)
        {
            return m1 * l;
        }

        public static Matrix operator +(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                m[i, i] = (m[i, i] + l) % m.Modulo;
            return m;
        }

        public static Matrix operator +(long l, Matrix m1)
        {
            return m1 + l;
        }

        public static Matrix operator -(Matrix m1, long l)
        {
            return m1 + (-l);
        }

        public static Matrix operator -(long l, Matrix m1)
        {
            var m = m1.Clone() * -1;
            return m + l;
        }

        public Matrix BinPower(long l)
        {
            var n = 1;
            var m = Clone();
            var result = new Matrix(m.Height, m.Width) + 1;
            result.Modulo = m.Modulo;
            while (l != 0)
            {
                var i = l & ~(l - 1);
                l -= i;
                while (n < i)
                {
                    m = m * m;
                    n <<= 1;
                }
                result *= m;
            }
            return result;
        }

        public void Fill(long l)
        {
            l %= Modulo;
            for (var i = 0; i < _height; i++)
                for (var j = 0; j < _width; j++)
                    _data[i, j] = l;
        }

        public Matrix Clone()
        {
            var m = new Matrix(_width, _height);
            Array.Copy(_data, m._data, _data.Length);
            m.Modulo = Modulo;
            return m;
        }

        public long this[int i, int j]
        {
            get { return _data[i, j]; }
            set { _data[i, j] = value % Modulo; }
        }
    }

    public class RedBlackTree<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTree(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key, TValue value)
        {
            var node = new Node { Key = key, Value = value, Red = true };
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
                node.Value = deleted.Value;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        public TValue this[TKey key]
        {
            get
            {
                var node = _search(key);
                return node == null ? default(TValue) : node.Value;
            }
            set
            {
                var node = _search(key);
                if (node == null) Add(key, value);
                else node.Value = value;
            }
        }

        public bool Check()
        {
            int count;
            return _root == null || _root.Check(out count);
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        [DebuggerDisplay("{ToString()}")]
        private sealed class Node
        {
            public TKey Key;
            public TValue Value;
            public bool Red;

            public Node Parent;
            public Node Left;
            public Node Right;

            public bool Check(out int count)
            {
                count = 0;
                if (Red)
                {
                    if (Left != null && Left.Red) return false;
                    if (Right != null && Right.Red) return false;
                }
                var left = 0;
                var right = 0;
                if (Left != null && !Left.Check(out left)) return false;
                if (Right != null && !Right.Check(out right)) return false;
                count = left + (Red ? 0 : 1);
                if (left != right)
                {
                    ;
                }
                return left == right;
            }

            public override string ToString()
            {
                return ToShortString(2);
            }

            private string ToShortString(int depth = 0)
            {
                return depth == 0
                    ? string.Format("{0}{1}", Red ? "*" : "", Key)
                    : string.Format("({1}<{0}>{2})", ToShortString(), Left == null ? "null" : Left.ToShortString(depth - 1), Right == null ? "null" : Right.ToShortString(depth - 1));
            }
        }

        #endregion

        #region IEnumerable

        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }

    public class RedBlackTreeSimple<TKey>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTreeSimple(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key)
        {
            var node = new Node(key);
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        private sealed class Node
        {
            public Node(TKey key)
            {
                Key = key;
            }

            public TKey Key;
            public bool Red = true;

            public Node Parent;
            public Node Left;
            public Node Right;
        }

        #endregion
    }

    /// <summary>
    /// Fenwick tree for summary on the array
    /// </summary>
    public class FenwickSum
    {
        public readonly int Size;
        private readonly int[] _items;
        public FenwickSum(int size)
        {
            Size = size;
            _items = new int[Size];
        }

        public FenwickSum(IList<int> items)
            : this(items.Count)
        {
            for (var i = 0; i < Size; i++)
                Increase(i, items[i]);
        }

        private int Sum(int r)
        {
            if (r < 0) return 0;
            if (r >= Size) r = Size - 1;
            var result = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
                result += _items[r];
            return result;
        }

        private int Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public int this[int r]
        {
            get { return Sum(r); }
        }

        public int this[int l, int r]
        {
            get { return Sum(l, r); }
        }

        public void Increase(int i, int delta)
        {
            for (; i < Size; i = i | (i + 1))
                _items[i] += delta;
        }
    }

    /// <summary>
    /// Prime numbers
    /// </summary>
    public class Primes
    {
        /// <summary>
        /// Returns prime numbers in O(n)
        /// Returns lowet divisors as well
        /// Memory O(n)
        /// </summary>
        public static void ImprovedSieveOfEratosthenes(int n, out int[] lp, out List<int> pr)
        {
            lp = new int[n];
            pr = new List<int>();
            for (var i = 2; i < n; i++)
            {
                if (lp[i] == 0)
                {
                    lp[i] = i;
                    pr.Add(i);
                }
                foreach (var prJ in pr)
                {
                    var prIj = i * prJ;
                    if (prJ <= lp[i] && prIj <= n - 1)
                    {
                        lp[prIj] = prJ;
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }

        /// <summary>
        /// Returns prime numbers in O(n*n)
        /// </summary>
        public static void SieveOfEratosthenes(int n, out List<int> pr)
        {
            var m = 50000;//(int)(3l*n/(long)Math.Log(n)/2);
            pr = new List<int>();
            var f = new bool[m];
            for (var i = 2; i * i <= n; i++)
                if (!f[i])
                    for (var j = (long)i * i; j < m && j * j < n; j += i)
                        f[j] = true;
            pr.Add(2);
            for (var i = 3; i * i <= n; i += 2)
                if (!f[i])
                    pr.Add(i);
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static int Gcd(int x, int y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static long Gcd(long x, long y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static BigInteger Gcd(BigInteger x, BigInteger y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Returns all divisors of n in O(√n)
        /// </summary>
        public static IEnumerable<long> GetDivisors(long n)
        {
            long r;
            while (true)
            {
                var x = Math.DivRem(n, 2, out r);
                if (r != 0) break;
                n = x;
                yield return 2;
            }
            var i = 3;
            while (i <= Math.Sqrt(n))
            {
                var x = Math.DivRem(n, i, out r);
                if (r == 0)
                {
                    n = x;
                    yield return i;
                }
                else i += 2;
            }
            if (n != 1) yield return n;
        }
    }

    /// <summary>
    /// Graph matching algorithms
    /// </summary>
    public class GraphMatching
    {
        #region Kuhn algorithm

        /// <summary>
        /// Kuhn algorithm for finding maximal matching
        /// in bipartite graph
        /// Vertexes are numerated from zero: 0, 1, 2, ... n-1
        /// Return array of matchings
        /// </summary>
        public static int[] Kuhn(List<int>[] g, int leftSize, int rightSize)
        {
            Debug.Assert(g.Count() == leftSize);

            var matching = new int[leftSize];
            for (var i = 0; i < rightSize; i++)
                matching[i] = -1;
            var used = new bool[leftSize];

            for (var v = 0; v < leftSize; v++)
            {
                Array.Clear(used, 0, leftSize);
                _kuhn_dfs(v, g, matching, used);
            }

            return matching;
        }

        private static bool _kuhn_dfs(int v, List<int>[] g, int[] matching, bool[] used)
        {
            if (used[v]) return false;
            used[v] = true;
            for (var i = 0; i < g[v].Count; i++)
            {
                var to = g[v][i];
                if (matching[to] == -1 || _kuhn_dfs(matching[to], g, matching, used))
                {
                    matching[to] = v;
                    return true;
                }
            }
            return false;
        }

        #endregion
    }
}

using System;
using System.Collections.Generic;
class X{
	public static void Main(String[] args){
		String n = System.Console.ReadLine();
		String m = System.Console.ReadLine();
		if(n == "0"){
			if(m == "0"){
				System.Console.WriteLine("OK");

			}else{
				System.Console.WriteLine("WRONG_ANSWER");
			}
			return;
		}

		List<Int32> list =(new List<Char>(n.ToCharArray())).ConvertAll(delegate(char c){ return Int32.Parse(c.ToString());});
		list.Sort();

		int count = list.RemoveAll(delegate(int i){ return i== 0; } );

		for(int i = 0;i < count;i++){
			list.Insert(1,0);
		}
		String ss = "";
		list.ForEach(delegate(int i){ ss = ss + i.ToString(); });
		if(ss == m){
			System.Console.WriteLine("OK");
		}else{
			System.Console.WriteLine("WRONG_ANSWER");
		}
		return;
	}
}

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

namespace N1
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] arr;
            string s = null;

            string[] numbers=new string[2];

            numbers[0] = Console.ReadLine();
            numbers[1] = Console.ReadLine();

            arr = numbers[0].ToArray();
            Array.Sort(arr);

            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] != '0')
                {
                    char temp = arr[0];
                    arr[0] = arr[i];
                    arr[i] = temp;
                    break;
                }
            }

            foreach (char x in arr)
                s += x;

            if (s == numbers[1])
                Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");

            Console.ReadLine();

        }
    }
}

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

namespace Задача_1
{
    class Program
    {
     static void Main(string[] args)
        {
          //   Console.WriteLine("введите первое число");
             string text=Console.ReadLine();//Ввод из консоли первой строки
             if (ControlInput(text)) return;  //Проверяем правильность ввода, если неправильно закрываем программу
         //    Console.WriteLine("введите второе число");
             string text2 = Console.ReadLine();
             if (ControlInput(text)) return;
             if (text.Length == text2.Length) //Проверяем числа на одинаковость длин
             {
                 uint[] Mass1 = new uint[text.Length];//Создаем два массива для хранения чисел
                 uint[] Mass2 = new uint[text.Length];
                 StringInMass(ref Mass1, text);//Переводим введеную строку в масив чисел
                 StringInMass(ref Mass2, text2);
                 MassObr(Mass1, Mass2);//,Сравниваем числа
             }
             else//если числа не равны по длинне
             {
                 Console.WriteLine("WRONG_ANSWER");
                 Console.ReadLine();
             }

     }

//===============Функция проверки правильности ввода========================================
     public static bool ControlInput(string Text)
     {
         Regex myReg = new Regex(@"\D"); //Создаем шаблон "любой символ кроме цифр"
         if (Text.Length > 10 || myReg.IsMatch(Text))//если число длинное и есть символы-ошибка ввода
         {
             Console.WriteLine("Слишком длинное число или введены недопустимые символы");
             Console.ReadLine();
             return true;
         }
         return false;
     }
//=======================Конец функции првоерки правильности ввода=======================

//=======================Функция Перевод введеной строки в масив чисел==========================
     public static void StringInMass(ref uint[] Mass, string text)
     {   //да, числа записываются задом наперед. НО пользователю то всеравно че внутри =)
         int lenText = text.Length; //запоминаем длинну строки
         for (int i = 0; i <= lenText - 1; i++) //бегаем пока не кончится строка
         {
             //Переводим введеную строку в число с помощью функции.
             //записываем в ячейку массива остаток от деления на десять.
             Mass[i] = Convert.ToUInt32(text) % 10;
             text = text.Remove(text.Length - 1);//убираем последний символ строки чтобы обрезать число
         }
     }
//=====================Конец Функции перевода строки в массив чисел============================

//=====================Функция Сортировки и сравнения чисел==================================================
     public static void MassObr(uint[] Mass1, uint[] Mass2)
     {

         for (int j = 0; j < Mass1.Length-1; j++)//стандартная сортировка пузырьком
         {
             for (int i = 0; i < Mass1.Length-j-1; i++)
             {
                 if (Mass1[i] < Mass1[i + 1])
                 {
                     uint b = Mass1[i];
                     Mass1[i] = Mass1[i + 1];
                     Mass1[i + 1] = b;

                 }

             }
         }

         if (Mass1[Mass1.Length - 1] == 0) //если в начале числа ведущий 0
         {

             for (int i = Mass1.Length-1; i > 0; i--) //заменеяем ноль на первое минимальное число
             {
                 if (Mass1[i - 1] != 0)
                 {
                     uint b = Mass1[i-1];
                     Mass1[i-1] = Mass1[i];
                     Mass1[Mass1.Length - 1] = b;
                     break;
                 }
             }

         }
         //Сравниваем два массива с помощью функции
         if (Mass1.SequenceEqual(Mass2)) Console.WriteLine("OK"); else Console.WriteLine("WRONG_ANSWER");
         Console.ReadLine();

     }
  //====================Конец Функции сортировки и сравниния чисел================================
        }
    }
;

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

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        var a = ReadToken().ToCharArray();
        Array.Sort(a);
        if (a[0] == '0')
            for (int i = 1; i < a.Length; i++)
                if (a[i] != '0')
                {
                    a[0] = a[i];
                    a[i] = '0';
                    break;
                }

        Write(new string(a) == ReadToken() ? "OK" : "WRONG_ANSWER");
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

#define Online

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

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {
            string[] a = new string[3];
            for (int i = 0; i < 3; i++)
                a[i] = ReadLine();
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    if (!a[i][j].Equals(a[2 - i][2 - j]))
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                }
            }
            Console.WriteLine("Yes");
        }

        static void B()
        {
            int n;
            n = ReadInt();
            string m = ReadLine();
            int[] digits = new int[10];
            while (n != 0)
            {
                digits[n % 10]++;
                n /= 10;
            }
            int ans = 0;
            for (int i = 1; i < 10; i++)
            {
                if (digits[i] != 0)
                {
                    ans += i;
                    digits[i]--;
                    break;
                }
            }
            for (int i = 0; i < 10; i++)
            {
                while (digits[i] != 0)
                {
                    ans = ans * 10 + i;
                    digits[i]--;
                }
            }
            if (ans.ToString().Equals(m))
                Console.WriteLine("OK");
            else
                Console.WriteLine("WRONG_ANSWER");
        }

        static void C()
        {
            int left, right, up, down;
            left = right = up = down = 0;
            int a, b;
            string[] tokens = ReadArray(' ');
            a = int.Parse(tokens[0]);
            b = int.Parse(tokens[1]);
            string s = ReadLine();
            if (a == 0 && b == 0)
            {
                Console.WriteLine("Yes");
                return;
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].Equals('U')) up++;
                if (s[i].Equals('D')) down++;
                if (s[i].Equals('L')) left++;
                if (s[i].Equals('R')) right++;
            }
            int _left, _right, _up, _down;
            _left = _right = _up = _down = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].Equals('U')) _up++;
                if (s[i].Equals('D')) _down++;
                if (s[i].Equals('L')) _left++;
                if (s[i].Equals('R')) _right++;
                int _a = a + _left;
                _a -= _right;
                int _b = b - _up;
                _b += _down;
                if (_a == 0 && _b == 0)
                {
                    Console.WriteLine("Yes");
                    return;
                }
                else
                {
                    int x = 0;
                    if (right - left != 0)
                        x = _a / (right - left);
                    if (up - down != 0)
                        x = _b / (up - down);

                    if (x >= 0 && (_a + x * (left - right)) == 0 && (_b + x * (down - up) == 0))
                    {
                        Console.WriteLine("Yes");
                        return;
                    }

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

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

        static string[] ReadArray(char sep)
        {
            return Console.ReadLine().Split(sep);
        }

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

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

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    class Edge
    {
        public int a;
        public int b;
        public int w;

        public Edge(int a, int b, int w)
        {
            this.a = a;
            this.b = b;
            this.w = w;
        }
    }

    class Graph
    {
        public List<int>[] g;
        public int[] color; //0-white, 1-gray, 2-black
        public int[] o; //open
        public int[] c; //close
        public int[] p;
        public int[] d;
        public List<Edge> e;
        public Stack<int> ans = new Stack<int>();
        public Graph(int n)
        {
            g = new List<int>[n + 1];
            for (int i = 0; i <= n; i++)
                g[i] = new List<int>();
            color = new int[n + 1];
            o = new int[n + 1];
            c = new int[n + 1];
            p = new int[n + 1];
            d = new int[n + 1];
        }

        const int white = 0;
        const int gray = 1;
        const int black = 2;

        public bool DFS(int u, ref int time)
        {
            color[u] = gray;
            time++;
            o[u] = time;
            for (int i = 0; i < g[u].Count; i++)
            {
                int v = g[u][i];
                if (color[v] == gray)
                {
                    return true;
                }
                if (color[v] == white)
                {
                    p[v] = u;
                    if (DFS(v, ref time)) return true;
                }
            }
            color[u] = black;
            ans.Push(u);
            c[u] = time;
            time++;
            return false;
        }
    }

    static class GraphUtils
    {
        const int white = 0;
        const int gray = 1;
        const int black = 2;

        public static void BFS(int s, Graph g)
        {
            Queue<int> q = new Queue<int>();
            q.Enqueue(s);
            while (q.Count != 0)
            {
                int u = q.Dequeue();
                for (int i = 0; i < g.g[u].Count; i++)
                {
                    int v = g.g[u][i];
                    if (g.color[v] == white)
                    {
                        g.color[v] = gray;
                        g.d[v] = g.d[u] + 1;
                        g.p[v] = u;
                        q.Enqueue(v);
                    }
                }
                g.color[u] = black;
            }
        }

        public static bool DFS(int u, ref int time, Graph g, Stack<int> st)
        {
            g.color[u] = gray;
            time++;
            g.o[u] = time;
            for (int i = 0; i < g.g[u].Count; i++)
            {
                int v = g.g[u][i];
                if (g.color[v] == gray)
                {
                    return true;
                }
                if (g.color[v] == white)
                {
                    g.p[v] = u;
                    if (DFS(v, ref time, g, st)) return true;
                }
            }
            g.color[u] = black;
            st.Push(u);
            g.c[u] = time;
            time++;
            return false;
        }

        public static void FordBellman(int u, Graph g)
        {
            int n = g.g.Length;
            for (int i = 0; i <= n; i++)
            {
                g.d[i] = int.MaxValue;
                g.p[i] = 0;
            }

            g.d[u] = 0;

            for (int i = 0; i < n - 1; i++)
            {
                for (int j = 0; j < g.e.Count; j++)
                {
                    if (g.d[g.e[j].a] != int.MaxValue)
                    {
                        if (g.d[g.e[j].a] + g.e[j].w < g.d[g.e[j].b])
                        {
                            g.d[g.e[j].b] = g.d[g.e[j].a] + g.e[j].w;
                            g.p[g.e[j].b] = g.e[j].a;
                        }
                    }
                }
            }
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }
}

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

//12B. Правильное решение?

namespace CodeForces
{
    class Solution
    {
        void solve()
        {
            var a = Console.ReadLine().Select(c => (int)c - '0').ToArray();
            Array.Sort(a);

            if (a[0] == 0)
            {
                for (int i = 1; i < a.Length; i++)
                {
                    if (a[i] != 0)
                    {
                        a[0] = a[i];
                        a[i] = 0;
                        break;
                    }
                }
            }

            string ans = string.Join("", a);
            Console.WriteLine(Console.ReadLine() == ans ? "OK" : "WRONG_ANSWER");
#if DEBUG

#endif
        }

        static void Main()
        {
            new Solution().solve();
#if DEBUG
            Console.WriteLine("debug stop");
            Console.ReadKey(true);
#endif
        }
    }
}

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

namespace tmp
{
    class Program
    {
        static void Main(string[] args)
        {
            int big = Convert.ToInt32(Console.ReadLine());
            string bob = Console.ReadLine();
            int small = Convert.ToInt32(bob);
            if (bob.Length != small.ToString().Length) { Console.Write("WRONG_ANSWER"); goto end; }
            if (big == 0 && small == 0) { Console.Write("OK"); goto end; }
            if (big == 0 || small == 0) { Console.Write("WRONG_ANSWER"); goto end; }
            string a = big.ToString();
            char[] b = a.ToCharArray();
            Array.Sort(b);
            int zero = 0;
            int num = 1;
            int index = 0;
            while (index < b.Length && b[index] == '0')
            {
                zero++;
                index++;
            }
            if (zero == 0) num = 0;
            else num = (b[index++] - '0') * (int)Math.Pow(10, zero);
            while (index < b.Length)
                num = 10 * num + b[index++] - '0';
            if (num == small) Console.Write("OK");
            else Console.Write("WRONG_ANSWER");
        end:
            ;
        }
    }
}

using System;
using System.Collections.Generic;

namespace cf_12b
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            int first = int.Parse(Console.ReadLine());

            string secondStr = Console.ReadLine ();

            if (secondStr.Length > 1 && secondStr [0] == '0') {
                Console.WriteLine ("WRONG_ANSWER");
                return;
            }

            int second = int.Parse(secondStr);

            int answer = GetRightAnswer (first);

            if (second == answer)
                Console.WriteLine ("OK");
            else
                Console.WriteLine ("WRONG_ANSWER");
        }

        private static int GetRightAnswer(int number) {
            if (number == 0)
                return 0;

            var digits = GetDigits(number);

            Array.Sort (digits);

            if (digits [0] == 0) {
                int i = 1;
                while (digits[i] == 0)
                    i++;

                digits [0] = digits [i];
                digits [i] = 0;
            }

            int answer = 0;
            for (int i = 0; i < digits.Length; i++) {
                answer = answer * 10 + digits [i];
            }

            return answer;
        }

        private static int[] GetDigits(int number) {
            var digits = new List<int> ();
            digits.Add (number % 10);
            number = number / 10;

            while (number > 0) {
                digits.Add (number % 10);
                number = number / 10;
            }

            return digits.ToArray();
        }
    }
}

using System;
using System.IO;
using System.Collections;

class Program
{
  class Pair : System.IComparable
  {
    public int x;
    public int y;

    public Pair (int xx, int yy)
    {
      x = xx;
      y = yy;
    }

    public int CompareTo(object obj)
    {
      Pair p = (Pair) obj;
      return x < p.x ? -1 : x == p.x ? 0 : 1;
    }
  }

  static void Main(string[] args)
  {
    //Console.SetIn(File.OpenText("../../input.txt"));
    int [] a = new int[10];

    string n = Console.ReadLine();
    for (int i = 0; i < n.Length; ++i)
      ++a[n[i] - '0'];

    string m = Console.ReadLine();

    string s = "";
    if (n.Equals("0") && n.Equals(m))
    {
      Console.WriteLine("OK");
      return;
    }

    bool f = true;
    bool find = true;
    while (find)
    {
      find = false;
      for (int i = f ? 1 : 0; i < 10; ++i)
        if (a[i] > 0)
        {
          a[i]--;
          s += i;
          find = true;
          break;
        }
      f = false;
    }

    Console.WriteLine(m.Equals(s) ? "OK" : "WRONG_ANSWER");

    /*
    string str = "";
    while (!string.IsNullOrEmpty((str = Console.ReadLine())))

    var dict = new System.Collections.Generic.Dictionary<string, int>();

    Pair[] a = new Pair[100];
    for (int i = 0; i < a.Length; ++i)
      a[i] = new Pair(100 - i, i);
    Array.Sort(a);

    int testCount = Convert.ToInt32(Console.ReadLine());
    int n = int.Parse(Console.ReadLine());
    string[] data = Console.ReadLine().Split(new char[] { ' ' });
    */

    Console.ReadKey();
  }
}

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

namespace Codeforces
{
    class Functions
    {
        public static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

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

        public static string[] ReadLineWithSplit(char split)
        {
            return Console.ReadLine().Split(split);
        }

        public static string[] ReadLines(int count)
        {
            string[] lines = new string[count];
            for (int x = 0; x < count; x++)
            {
                lines[x] = ReadLine();
            }
            return lines;
        }
        public static string ReverseInts(string s)
        {
            string[] charArray = s.Split(' ');
            Array.Reverse(charArray);
            return charArray.Aggregate("", (current, s1) => current + (s1 + " "));
        }
        public static string Reverse(string s)
        {
            char[] charArray = s.ToCharArray();
            Array.Reverse(charArray);
            return charArray.Aggregate("", (current, s1) => current + (s1 + " "));
        }
    }
    class Program
    {
        private static void Main()
        {
            string line1 = Functions.ReadLine();
            string line2 = Functions.ReadLine();

            bool test = true;
            foreach (char c in line1)
            {
                if (!line2.Contains(c))
                    test = false;
            }
            if (line2.Length != line1.Length)
                test = false;
            if (test)
            {
                //order by then count leading zeros replace with smallest number
                char[] optimal = line1.ToCharArray().OrderBy(o => o).ToArray();
                if (optimal[0] == '0' && optimal.Length > 1)
                {
                    int count = 0;
                    foreach (char c in optimal)
                    {
                        if (c == '0')
                            count++;
                    }
                    int cp_count = count;
                    for (int i = 0; i < 1; i++)
                    {
                        char temp = optimal[i];
                        optimal[i] = optimal[cp_count];
                        optimal[cp_count] = temp;
                        cp_count++;
                    }
                }
                if(new string(optimal) == line2)
                    Console.WriteLine("OK");
                else
                    Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                Console.WriteLine("WRONG_ANSWER");
            }

        }
    }
}

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

namespace Contest_12
{
    class Program
    {
        static void B()
        {
            var s = Console.ReadLine();
            string r1 = Console.ReadLine();
            string r2 = "";
            int[] a = new int[10];

            for (int i = 0; i < s.Length; i++)
            {
                a[int.Parse(s[i].ToString())]++;
            }

            for (int i = 1; i < 10; i++)
            {
                if (a[i] > 0)
                {
                    r2 += i;
                    a[i]--;
                    break;
                }
            }

            for (int i = 0; i < 10; i++)
            {
                while (a[i] > 0)
                {
                    r2 += i;
                    a[i]--;
                }
            }

            Console.WriteLine(r1 == r2 ? "OK" : "WRONG_ANSWER");
        }

        static void Main(string[] args)
        {
            B();
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] cs = Console.ReadLine().ToCharArray();
            Array.Sort(cs);
            for (int i = 0; i < cs.Length; ++i)
                if (cs[i] != '0')
                {
                    char tmp = cs[0];
                    cs[0] = cs[i];
                    cs[i] = tmp;
                    break;
                }
            char[] cc = Console.ReadLine().ToCharArray();

            if(!cc.SequenceEqual(cs))
                Console.Write("WRONG_ANSWER");
            else Console.Write("OK");
        }
    }
}

/*           Array.Sort(cs);
for (int i = 0; i < cs.Length; ++i)
    if (cs[i] != '0')
    {
        char tmp = cs[0];
        cs[0] = cs[i];
        cs[i] = tmp;
        break;
    }
Console.WriteLine(cs);
for(int i=0;i<cs.Length;++i)
    if (Console.Read() != cs[i])
    {
        Console.Write("WRONG_ANSWER");
        return;
    }
Console.Write("OK");*/
/*
            string[] names = Console.ReadLine().Split(' ');
            int[] count = { int.Parse(names[0]), int.Parse(names[1]) };
            int[] much = new int[count[0]];
            int i=0;
            foreach (string s in Console.ReadLine().Split(' '))
                much[i++] = int.Parse(s);
            names = new string[count[1]];
            for (i = 0; i < count[1]; ++i)
                names[i] = Console.ReadLine();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            foreach (string s in names)
            {
                if (dic.ContainsKey(s)) ++dic[s];
                else dic.Add(s, 1);
            }

            List<KeyValuePair<string, int>> tmp = new List<KeyValuePair<string, int>>(dic.Count);
            foreach (KeyValuePair<string, int> item in dic)
                tmp.Add(item);
            tmp.Sort((x, y) => { return x.Value.CompareTo(y.Value); });
            tmp.Reverse();

            Array.Sort(much);

            int v=0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString() + " ");

            Array.Reverse(much);
            v = 0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString());*/
/*            int count = int.Parse(Console.ReadLine());
            List<int[]> vb = new List<int[]>(count);
            string[] sb = Console.ReadLine().Split(' ');
            string[] si = Console.ReadLine().Split(' ');
            string[] sr = Console.ReadLine().Split(' ');
            for(int i=0;i<count;++i)
                vb.Add(new int[] { int.Parse(sb[i]), int.Parse(si[i]), int.Parse(sr[i]) });

            uint c = 0;
            for (int i = 0; i < count; ++i)
            {
                int[] a = vb[i];
                for (int ii = 0; ii < count; ++ii)
                {
                    int[] b = vb[ii];
                    if (a[0] < b[0] && a[1] < b[1] && a[2] < b[2])
                    {
                        ++c;
                        vb.RemoveAt(i--);
                        --count;
                        break;
                    }
                }
            }
            Console.Write(c);*/

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

class Program
{
    public static int[] Read(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        int[] ret = new int[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = int.Parse(tokens[i]);
        }

        return ret;
    }

    public static double[] ReadDouble(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        double[] ret = new double[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = double.Parse(tokens[i], CultureInfo.InvariantCulture);
        }

        return ret;
    }

    static string Reverse(string s)
    {
        char[] a = s.ToCharArray();
        Array.Reverse(a);
        return new string(a);
    }

    static List<int>[] adj;
    static bool[] visited = new bool[1 << 20];
    static int[] count = new int[20];

    static void Solve(int cur_i, int v_mask, int source_i, int len)
    {
        visited[v_mask] = true;

        for (int i = 0; i < adj[cur_i].Count; i++)
        {
            int n = adj[cur_i][i];
            if (n == source_i && len > 1)
            {
                count[len]++;
                continue;
            }
            if ((v_mask & (1 << n)) != 0) continue;
            Solve(n, v_mask | (1 << n), source_i, len + 1);
        }
    }

    static void Main(string[] args)
    {
        string n = Console.ReadLine().Trim();
        string g = Console.ReadLine().Trim();

        if (n == "0" && g == "0")
        {
            Console.WriteLine("OK");
            return;
        }

        char[] a = n.ToCharArray();
        Array.Sort(a);
        int i = 0;
        while (i < a.Length && a[i] == '0') i++;
        if (i <= a.Length - 1 && a[0] == '0')
        {
            a[0] = a[i];
            a[i] = '0';
        }
        if (a[0] == '0') Console.WriteLine("WRONG_ANSWER");
        else
        {
            string m = new string(a);
            if (m == g) Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");
        }
    }
}

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

namespace b
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] given = Console.ReadLine().ToCharArray();
            char[] result = Console.ReadLine().ToCharArray();
            if (result.Length != given.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                Array.Sort(given);
                int index = 0;
                while (index < given.Length && given[index] == '0')
                {
                    index++;
                }
                if (index < given.Length && index!=0)
                {
                    given[index] ^= given[0];
                    given[0] ^= given[index];
                    given[index] ^= given[0];
                }
                bool ok = true; ;
                for (int i = 0; i < given.Length; i++)
                {
                    if (given[i] != result[i])
                    {
                        ok = false;
                        break;
                    }
                }
                if (ok)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }
    }
}

using System;
using System.Linq;

public class Solution
{
    public static void Main()
    {
        char[] chrIn = Console.ReadLine().ToCharArray().OrderBy(x => x).ToArray();
        string ans = Console.ReadLine();
        int n = chrIn.Length;
        if (ans.Length != n)
        {
            Console.WriteLine("WRONG_ANSWER");
            return;
        }
        if (chrIn[0] == '0')
        {
            int i = 0;
            while (i < n && chrIn[i] == '0')
            {
                i++;
            }
            if (i < n)
            {
                chrIn[0] = chrIn[i];
                chrIn[i] = '0';
            }
        }
        for (int j = 0; j < n; j++)
        {
            if (chrIn[j] != ans[j])
            {
                Console.WriteLine("WRONG_ANSWER");
                return;
            }
        }
        Console.WriteLine("OK");
    }
}

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

namespace task12B
{
    class Program
    {
        public static string DeleteFirstsNulls(string number)
        {
            string result = string.Empty;
            Int32 i = 0;
            while (i<number.Length && number[i] == '0')
            {
                i++;
            }
            for (Int32 j = i; j < number.Length; j++)
            {
                result += number[j];
            }
            return result;
        }
        public static string GetOptimal(string number)
        {
            Int32 countNulls = 0;
            for (Int32 i = 0; i < number.Length; i++)
            {
                if (number[i] == '0')
                {
                    countNulls++;
                }
            }
            number = number.Replace("0", "");
            Int32[] arr = new int[number.Length];
            for (Int32 i = 0; i < number.Length; i++)
            {
                arr[i] = number[i]-48;
            }
            for (Int32 i = 0; i < arr.Length; i++)
            {
                for (Int32 j = i + 1; j < arr.Length; j++)
                {
                    if (arr[i] >= arr[j])
                    {
                        Int32 t = arr[i];
                        arr[i] = arr[j];
                        arr[j] = t;
                    }
                }
            }
            string result = "";
            result = arr[0].ToString();
            for (Int32 i = 0; i < countNulls; i++)
            {
                result += "0";
            }
            for (Int32 i = 1; i < arr.Length; i++)
            {
                result += arr[i].ToString();
            }
            return result;
        }
        static void Main(string[] args)
        {
            string number = Console.ReadLine();
            string answer = Console.ReadLine();
            //Console.WriteLine(DeleteFirstsNulls(number));
            if (number == "0")
            {
                if (answer == "0")
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else
            {
                if (GetOptimal(number) == answer)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            //Console.ReadLine();
            //string answer = Console.ReadLine();
            //
        }
    }
}

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

namespace Timus
{
    class Problems
    {
        static void Main()
        {
            var n = Console.ReadLine();
            var m = Console.ReadLine();
                Console.WriteLine((GetSmallerView(n) == m) ? "OK" : "WRONG_ANSWER");
        }

        static string GetSmallerView(string n)
        {
            var _n = n.ToCharArray().Select(x => int.Parse(x.ToString())).ToList();
            var null_count = _n.Count(x => x == 0);
            var min = 0;
            var __n = _n.FindAll(x => x != 0);
            if (__n.Count != 0)
                min = __n.Min();
            _n.RemoveAll(x => x == 0);
            _n.Remove(min);
            _n.Sort();
            if (min == 0)
                return $"{new string('0', null_count)}{string.Concat(_n)}";
            return $"{min}{new string('0', null_count)}{string.Concat(_n)}";
        }
    }
}

using System;
using System.Collections.Generic;

namespace Application
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int a = int.Parse (Console.ReadLine ());
			string b = Console.ReadLine ();
			if((a==0)&&((b=="0")))
				Console.WriteLine("OK");
			else
			if (a.ToString().Length<b.Length) {
				Console.WriteLine ("WRONG_ANSWER");

			} else
				if(a==0) Console.WriteLine("WRONG_ANSWER");
			else
			{
				List<int> mas = new List<int> ();
				while (a!=0) {
					mas.Add (a % 10);
					a /= 10;
				}
				int index = 0;
				mas.Sort ();
				for (int i = 0; i<mas.Count; i++)
					if (mas [i] != 0) {
						index = i;
						break;
					}
				string str = mas [index].ToString ();
				for (int i=0; i<index; i++)
					str += mas [i].ToString ();
				for (int i=index+1; i<mas.Count; i++)
					str += mas [i].ToString ();
				if (b == str)
					Console.WriteLine ("OK");
				else
					Console.WriteLine ("WRONG_ANSWER");
			}
		}
	}
}

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

namespace CodeForces
{
    public class CodeForcesClass
    {
        public static void Main()
        {
            var n = Read<string>();
            var m = Read<string>();
            var arr = n.ToArray().ToList();
            arr.Sort();
            if (arr.First() == '0')
            {
                var idx = 0;
                for (var i = 0; i < arr.Count; i++)
                {
                    if (arr[i] != '0')
                    {
                        arr[0] = arr[i];
                        arr[i] = '0';
                        break;
                    }
                }
            }
            var result = new string(arr.ToArray()) == m ? "OK" : "WRONG_ANSWER";
            Console.WriteLine(result);
        }

        // Here goes misc

        public static T Read<T>()
        {
            var line = Console.ReadLine();
            var item = Convert.ChangeType(line, typeof (T));
            return (T) item;
        }

        public static List<T> ReadList<T>(char[] delimiters = null)
        {
            var line = Read<string>();
            var split = line.Split(delimiters ?? new[] {' '});
            var list = split.Select(item => (T) Convert.ChangeType(item, typeof (T))).ToList();
            return list;
        }

        public static List<T> ReadListNlines<T>(int n)
        {
            var list = new List<T>();
            for (var i = 0; i < n; i++)
            {
                list.Add(Read<T>());
            }
            return list;
        }

        public static void ReadFromFile()
        {
            Console.SetIn(new StreamReader(@"..\..\input.txt"));
        }

        public static bool NextPermutation<T>(T[] items) where T : IComparable
        {
            var i = -1;
            for (var x = items.Length - 2; x >= 0; x--)
            {
                if (items[x].CompareTo(items[x + 1]) < 0)
                {
                    i = x;
                    break;
                }
            }

            if (i == -1)
            {
                return false;
            }
            var j = 0;
            for (var x = items.Length - 1; x > i; x--)
            {
                if (items[x].CompareTo(items[i]) > 0)
                {
                    j = x;
                    break;
                }
            }
            var temp = items[i];
            items[i] = items[j];
            items[j] = temp;
            Array.Reverse(items, i + 1, items.Length - (i + 1));
            return true;
        }

        public static string ReplaceChar(string str, char c, int idx)
        {
            return str.Substring(0, idx) + c + str.Substring(idx + 1);
        }
    }
}

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

class Program
{
    public static void Main(string[] args)
    {
        //MulticaseTest();
        //int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int n = int.Parse(Console.ReadLine());
        string _m = Console.ReadLine();
        int m = int.Parse(_m);
        // find smallest number then compare it to m
        int r = m;
        if (n > 0)
        {
            if (n.ToString().Contains('0'))
            {
                char l = n.ToString().Where(x => x != '0').OrderBy(x => x).First();
                string u = l.ToString();
                List<char> j = n.ToString().Select(x => x).ToList();
                j.Remove(l);
                r = int.Parse(u + string.Join("", j.Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
            else
            {
                r = int.Parse(string.Join("", n.ToString().Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
        }
        else
        {
            r = n;
        }
        if (n == 0)
        {
            if (_m.Length == 1 && m == 0) Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");
        }
        else
        {
            if (r == m) { if (_m[0] != '0') { Console.WriteLine("OK"); } else { Console.WriteLine("WRONG_ANSWER"); } }
            else Console.WriteLine("WRONG_ANSWER");
        }

    }

    public static void MulticaseTest()
    {
        //4
        //4 5 2 3
        int t = int.Parse(Console.ReadLine());
        List<string> o = new List<string>(t);
        for (int i = 0; i < t; i++)
        {
            int n = int.Parse(Console.ReadLine());
            //List<int> input = Console.ReadLine().Split().Select(int.Parse).ToList();

        }
        o.ForEach(Console.WriteLine);
    }
}

using System;
using System.Collections.Generic;

class Solve
{

    public void solve()
    {
        string line = Console.ReadLine();
        List<char> n = new List<char>();
        for (int i = 0; i < line.Length; ++i)
            n.Add(line[i]);
        n.Sort();

        if (n[0] == '0' && n.Count > 1)
        {
            for (int i = 0; i < n.Count; ++i)
                if (n[i] != '0')
                {
                    n[0] = n[i];
                    n[i] = '0';
                    break;
                }
        }

        line = "";
        for (int i = 0; i < n.Count; ++i)
            line = line + n[i];

        if (line == Console.ReadLine())
            Console.WriteLine("OK");
        else
            Console.WriteLine("WRONG_ANSWER");
    }
}

class Program
{
    static void Main()
    {
        Solve Task = new Solve();
        Task.solve();
       // Console.ReadKey();
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Index
{
    public int start;
    public int end;
}
class Andy
{

    public static void Main()
    {

        var ii = Console.ReadLine().ToCharArray();
        var ans = Console.ReadLine();
        Array.Sort(ii);

        if (ii.Count() == 1)
        {
            if (ii[0].ToString() == ans.ToString())
            {
                Console.Write("OK");
            }
            else
            {
                Console.Write("WRONG_ANSWER");
            }
        }
        else
        {
            int i = 1;
            for (; i < ii.Length; i++)
            {
                if (ii[i - 1] == '0' && ii[i] == '0')
                {
                    ii[i - 1] = ' ';
                }
                else
                    break;

            }
            ii = string.Join("", ii).Replace(" ", string.Empty).ToCharArray();
            if (ii[0] == '0')
            {
                var tmp = ii[0];
                ii[0] = ii[1];
                ii[1] = tmp;
            }

            Console.Write(string.Join("", ii) == ans ? "OK" : "WRONG_ANSWER");
        }

    }

}

/*******************************************************************************
* Author: Nirushuu
*******************************************************************************/

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

/*******************************************************************************
* IO from Kattio.cs from open.kattis.com/help/csharp                          */
public class NoMoreTokensException : Exception
{
}

public class Tokenizer
{
    string[] tokens = new string[0];
    private int pos;
    StreamReader reader;

    public Tokenizer(Stream inStream)
    {
        var bs = new BufferedStream(inStream);
        reader = new StreamReader(bs);
    }

    public Tokenizer() : this(Console.OpenStandardInput())
    {
        // Nothing more to do
    }

    private string PeekNext()
    {
        if (pos < 0)
            // pos < 0 indicates that there are no more tokens
            return null;
        if (pos < tokens.Length)
        {
            if (tokens[pos].Length == 0)
            {
                ++pos;
                return PeekNext();
            }
            return tokens[pos];
        }
        string line = reader.ReadLine();
        if (line == null)
        {
            // There is no more data to read
            pos = -1;
            return null;
        }
        // Split the line that was read on white space characters
        tokens = line.Split(null);
        pos = 0;
        return PeekNext();
    }

    public bool HasNext()
    {
        return (PeekNext() != null);
    }

    public string Next()
    {
        string next = PeekNext();
        if (next == null)
            throw new NoMoreTokensException();
        ++pos;
        return next;
    }
}

public class Scanner : Tokenizer
{

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public float NextFloat()
    {
        return float.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }
}

public class BufferedStdoutWriter : StreamWriter
{
    public BufferedStdoutWriter() : base(new BufferedStream(Console.OpenStandardOutput()))
    {
    }
}
/******************************************************************************/

/*******************************************************************************
* DisjointSet datastructure                                                   */
public struct DisjointSet {
    public int[] parent;
    public int[] rank;
    public DisjointSet(int n) {
        parent = new int[n];
        for (int i = 0; i < n; ++i) {
            parent[i] = i;
        }
        rank = new int[n];
    }

    public int Find(int i) {
        int idx = i;
        var compress = new List<int>();
        while (idx != parent[idx]) {
            compress.Add(idx);
            idx = parent[idx];
        }

        foreach (var e in compress) {   // path compress
            parent[e] = idx;
        }
        return idx;
    }

    public void Union(int a, int b) {
        int aPar = this.Find(a);
        int bPar = this.Find(b);

        if (rank[aPar] > rank[bPar]) {  // by rank
            parent[bPar] = aPar;
        } else {
            parent[aPar] = bPar;
        }
        if (rank[aPar] == rank[bPar]) {
            ++rank[bPar];
        }
    }
}

class MaxHeap {
    List<int> data;

    public MaxHeap() {
        data = new List<int>();
    }

    public void Add(int a) {
        data.Add(a);
        int idx = data.Count - 1;
        int parent = (int) Math.Floor((double) (idx - 1) / 2);
        while (idx != 0 && (data[idx] > data[parent])) {
            int tmp = data[parent];
            data[parent] = data[idx];
            data[idx] = tmp;

            idx = parent;
            parent = (int) Math.Floor((double) (idx - 1) / 2);
        }
    }

    public int Pop() {
        int res = data[0];
        data[0] = data[data.Count - 1];
        data.RemoveAt(data.Count - 1);

        int idx = 0;
        while (true) {
            int child1 = (2 * idx) + 1;
            int child2 = (2 * idx) + 2;

            if (child1 >= data.Count) { // no children
                break;
            } else if (child2 >= data.Count) {  // one child
                if (data[idx] < data[child1]) {
                    int tmp = data[idx];
                    data[idx] = data[child1];
                    data[child1] = tmp;
                }
                break;
            } else {    // two children
                int maxChild = data[child1] > data[child2] ? child1 : child2;
                if (data[idx] < data[maxChild]) {
                    int tmp = data[idx];
                    data[idx] = data[maxChild];
                    data[maxChild] = tmp;
                    idx = maxChild;
                    continue;
                } else {    // no swap
                    break;
                }
            }
        }

        return res;
    }

}

class Dequeue {
    public Dictionary<int, int> data = new Dictionary<int, int>();
    int firstIdx;
    public int Count;
    public Dequeue() {
        data = new Dictionary<int, int>();
        firstIdx = 1;
        Count = 0;
    }

    public void PushFront(int a) {
        data[firstIdx - 1] = a;
        ++Count;
        --firstIdx;
    }

    public void PushBack(int a) {
        data[firstIdx + Count] = a;
        ++Count;
    }

    public int PopFront() {
        --Count;
        ++firstIdx;
        return data[firstIdx - 1];
    }

    public int PopBack() {
        --Count;
        return data[firstIdx + Count];
    }

    public int Get(int n) {
        return data[firstIdx + n];
    }
}
/******************************************************************************/

class MainClass {

    // Debug functions
    static void debug<T>(IEnumerable<T> a, string s = "") {
        Console.WriteLine($"name: {s}");
        int i = 0;
        foreach (var e in a) {
            Console.WriteLine($"value {i}: {e}");
            ++i;
        }
    }
    static void dbg<T>(T a, string s = "") {
        Console.WriteLine($"name: {s} value: {a}");
    }
    ////////////////////

    static int gcd(int a, int b) {
        while (b != 0) {
            int t = b;
            b = a % b;
            a = t;
        }
        return a;
    }

    static bool between(int a, int b, int c) {
        return (a >= b && a <= c);
    }

    static int findIn(string s, string a) {
        for (int i = 0; i < s.Length - (a.Length - 1); ++i) {
            bool found = true;
            for (int j = 0; j < a.Length; ++j) {
                if (s[i + j] != a[j]) {
                    found = false;
                    break;
                }
            }

            if (found) {
                return i;
            }
        }

        return -1;
    }

    static double dist(double a, double b, double c, double d) {
        return Math.Sqrt(Math.Pow((a - c), 2) + Math.Pow((b - d), 2));
    }

    public static void Main() {

        var sc = new Scanner();
        var wr = new BufferedStdoutWriter();
        var dot = new NumberFormatInfo();
        dot.NumberDecimalSeparator = ".";

        var n = new List<char>(sc.Next());
        var m = new List<char>(sc.Next());

        if (n.Count != m.Count) {
            wr.Write("WRONG_ANSWER");
            wr.Flush();
            return;
        }

        n.Sort();

        for (int i = 0; i < n.Count; ++i) {
            if (n[i] != '0') {
                char t = n[i];
                n[i] = '0';
                n[0] = t;
                break;
            }
        }

        for (int i = 0; i < n.Count; ++i) {
            if (n[i] != m[i]) {
                wr.Write("WRONG_ANSWER");
                wr.Flush();
                return;
            }
        }

        wr.Write("OK");

        wr.Flush();

    }
}

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

class Program
{

    void solve()
    {

        string n = nextString();
        string ans = nextString();
        int[] cnt = new int[10];
        for (int i = 0; i < n.Length; i++)
            cnt[n[i] - '0']++;
        string best = "";
        if (n == "0")
            best = "0";
        else
        {
            for (int i = 1; i <= 9; i++)
            {
                if (cnt[i] > 0)
                {
                    best = "" + i;
                    cnt[i]--;
                    break;

                }
            }
            for (int i = 0; i < 10; i++)
                best += new string((char)('0' + i), cnt[i]);

        }
        if (ans != best)
            Console.WriteLine("WRONG_ANSWER");
        else
            Console.WriteLine("OK");

    }

    //

    string[] inputLine = new string[0];
    int inputInd = 0;
    string nextLine()
    {
        return Console.ReadLine();
    }
    void readInput()
    {
        if (inputInd != inputLine.Length)
            throw new Exception();
        inputInd = 0;
        inputLine = Console.ReadLine().Split();

    }
    int nextInt()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return int.Parse(inputLine[inputInd++]);
    }
    long nextLong()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return long.Parse(inputLine[inputInd++]);
    }
    double nextDouble()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return double.Parse(inputLine[inputInd++]);
    }
    string nextString()
    {
        if (inputInd == inputLine.Length)
            readInput();
        return inputLine[inputInd++];
    }
    static void Main(string[] args)
    {
        new Program().solve();
    }
}

using System;
using System.IO;
using System.Reflection;

namespace ConsoleApplication1
{
    class Program
    {
        static void OpenConsole()
        {
            string strAppDir =
                        Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            Console.SetIn(new StreamReader(strAppDir + "\\input.txt"));
            Console.SetOut(new StreamWriter(strAppDir + "\\output.txt"));
        }

        static void CloseConsole()
        {
            Console.In.Close();
            Console.Out.Close();
        }

        static void Solve()
        {
            string[] t = Console.In.ReadToEnd().Split(new char[3] { ' ', '\n', '\r' },
                StringSplitOptions.RemoveEmptyEntries);
            if (t[0].Length == 1)
            {
                if (t[0] == t[1]) Console.Write("OK");
                else Console.Write("WRONG_ANSWER");
                return;
            }
            char[] tt = t[0].ToCharArray();
            Array.Sort(tt);
            int i = 0;
            while (i < tt.Length && tt[i] == '0') i++;
            if (i == tt.Length)
            {
                Console.Write("WRONG_ANSWER");
                return;
            }
            if (i != 0)
            {
                tt[0] = tt[i];
                tt[i] = '0';
            }
            if (new string(tt) == t[1]) Console.Write("OK");
            else Console.Write("WRONG_ANSWER");
        }

        static void Main(string[] args)
        {
#if !ONLINE_JUDGE
            OpenConsole();
#endif
            Solve();
#if !ONLINE_JUDGE
            CloseConsole();
#endif
        }
    }
}

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

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

        private static void Main(string[] args)
        {
            char[] n = reader.ReadLine().ToCharArray();
            int m = int.Parse(reader.ReadLine());

            Array.Sort(n);
            if (n[0] == '0')
            {
                for (int i = 0; i < n.Length; i++)
                {
                    if (n[i] != '0')
                    {
                        n[0] = n[i];
                        n[i] = '0';
                        break;
                    }
                }
            }

            writer.WriteLine(m == int.Parse(new string(n)) ? "OK" : "WRONG_ANSWER");
            writer.Flush();
        }
    }
}

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

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

        private static void Main(string[] args)
        {
            long n = Next();
            int m = Next();

            long d10 = 1;
            while (d10 <= n)
            {
                d10 *= 10;
            }
            d10 /= 10;

            long min = n;
            for (int i = 0; i < 9; i++)
            {
                long d = n%10;
                n /= 10;
                n = n + d10*d;
                if (d != 0 && min > n)
                    min = n;
            }

            writer.WriteLine(m == min ? "OK" : "WRONG_ANSWER");
            writer.Flush();
        }

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

#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

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

namespace b12b
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var val = Console.ReadLine();
            var cs = new int[10];
            for (int i = 0; i < val.Length; i++)
            {
                var next = -48 + (int)val[i];
                cs[next]++;
            }

            var ans = new StringBuilder();
            var first = true;
            for (int i = 1; i < 10; i++)
            {
                if (cs[i] > 0)
                {
                    ans.Append(i);
                    cs[i]--;

                    if (first)
                    {
                        for (int z = 0; z < cs[0]; z++)
                        {
                            ans.Append("0");
                        }
                        first = false;
                    }
                }

                for (int j = 0; j < cs[i]; j++)
                {
                    ans.Append(i);
                }
            }

            var res = Console.ReadLine();
            if (ans.Length != res.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
                return;
            }

            for (int i = 0; i < res.Length; i++)
            {
                if (ans[i] != res[i])
                {
                    Console.WriteLine("WRONG_ANSWER");
                    return;
                }
            }

            Console.WriteLine("OK");
            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

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

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

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}

#if DEBUG
using System.Reflection;
using System.Threading.Tasks;
#endif

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

namespace b12b
{
    class Program
    {
        static string _inputFilename = "input.txt";
        static string _outputFilename = "output.txt";
        static bool _useFileInput = false;

        static void Main(string[] args)
        {
            StreamWriter file = null;
#if DEBUG
			Console.SetIn(getInput());
#else
            if (_useFileInput)
            {
                Console.SetIn(File.OpenText(_inputFilename));
                file = new StreamWriter(_outputFilename);
                Console.SetOut(file);
            }
#endif

            try
            {
                solution();
            }
            finally
            {
                if (_useFileInput)
                {
                    file.Close();
                }
            }
        }

        static void solution()
        {
            #region SOLUTION
            var val = Console.ReadLine();
            var cs = new int[10];
            for (int i = 0; i < val.Length; i++)
            {
                var next = -48 + (int)val[i];
                cs[next]++;
            }

            var ans = new StringBuilder();
            for (int i = 1; i < 10; i++)
            {
                for (int j = 0; j < cs[i]; j++)
                {
                    ans.Append(i);

                    if (i == 1 && j == 0 && cs[0] > 0)
                    {
                        for (int z = 0; z < cs[0]; z++)
                        {
                            ans.Append("0");
                        }
                    }
                }
            }

            var res = Console.ReadLine();
            if (ans.Length != res.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
                return;
            }

            for (int i = 0; i < res.Length; i++)
            {
                if (ans[i] != res[i])
                {
                    Console.WriteLine("WRONG_ANSWER");
                    return;
                }
            }

            Console.WriteLine("OK");
            //var n = readInt();
            //var m = readInt();

            //var a = readIntArray();
            //var b = readIntArray();
            #endregion
        }

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

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

        static int[] readIntArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();
        }

        static long[] readLongArray()
        {
            return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();
        }

#if DEBUG
		static StreamReader getInput()
		{
			var resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];
			var resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);

			return new StreamReader(resource);
		}
#endif
    }
}

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

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

            if(Math.Floor(Math.Log10(n)) != Math.Floor(Math.Log10(m)) || a.Length != b.Length )
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                List<int> digits = new List<int>();
                while(n > 0)
                {
                    digits.Add(n % 10);
                    n /= 10;
                }

                digits.Sort();

                int x = 0;
                int zeroStop = 0;
                for(zeroStop = 0; zeroStop < digits.Count; ++zeroStop)
                {
                    if(digits[zeroStop] != 0)
                    {
                        break;
                    }
                }

                if(zeroStop == digits.Count)
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
                else
                {
                    x += digits[zeroStop];
                    for (int i = 0; i < zeroStop; ++i)
                        x *= 10;
                    for(int i = zeroStop + 1; i < digits.Count; ++i)
                    {
                        x *= 10;
                        x += digits[i];
                    }

                    if (x != m)
                        Console.WriteLine("WRONG_ANSWER");
                    else
                        Console.WriteLine("OK");
                }

            }
        }
    }
}

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

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

            if(Math.Floor(Math.Log10(n)) != Math.Floor(Math.Log10(m)))
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                List<int> digits = new List<int>();
                while(n > 0)
                {
                    digits.Add(n % 10);
                    n /= 10;
                }

                digits.Sort();

                int x = 0;
                int zeroStop = 0;
                for(zeroStop = 0; zeroStop < digits.Count; ++zeroStop)
                {
                    if(digits[zeroStop] != 0)
                    {
                        break;
                    }
                }

                if(zeroStop == digits.Count)
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
                else
                {
                    x += digits[zeroStop];
                    for (int i = 0; i < zeroStop; ++i)
                        x *= 10;
                    for(int i = zeroStop + 1; i < digits.Count; ++i)
                    {
                        x *= 10;
                        x += digits[i];
                    }

                    if (x != m)
                        Console.WriteLine("WRONG_ANSWER");
                    else
                        Console.WriteLine("OK");
                }

            }
        }
    }
}

using System;
using System.Globalization;
using System.IO;
using System.Linq;

namespace CF317
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
				//using (var sw = new StreamWriter("output.txt"))
			{
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var s1 = sr.NextString().ToCharArray();
			var s2 = sr.NextString().ToCharArray();
			if (s1[0] == '0' && s1.Length == 1) {
				if (s2[0] == '0')
					sw.WriteLine("OK");
				else
					sw.WriteLine("WRONG_ANSWER");
				return;
			}
			if (s2.Length != s1.Length) {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			Array.Sort(s1);
			var myAnsw = new char[s1.Length];
			var indx = 0;
			while (indx < s1.Length && s1[indx] == '0')
				indx++;

			var answIndx = 1;
			myAnsw[0] = s1[indx];
			for (var i = 0; i < s1.Length; i++) {
				if (i != indx) {
					myAnsw[answIndx] = s1[i];
					answIndx++;
				}
			}
			if (s2.Length != myAnsw.Length) {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			for (var i = 0; i < myAnsw.Length; i++) {
				if (s2[i] != myAnsw[i]) {
					sw.WriteLine("WRONG_ANSWER");
					return;
				}
			}

			sw.WriteLine("OK");
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
			.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
			.Select(s => func(s, CultureInfo.InvariantCulture))
			.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
			str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
				.Select(s => func(s, CultureInfo.InvariantCulture))
				.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose) {
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}

using System;
using System.Globalization;
using System.IO;
using System.Linq;

namespace CF317
{
	internal class Program
	{
		private static void Main(string[] args)
		{
			var sr = new InputReader(Console.In);
			//var sr = new InputReader(new StreamReader("input.txt"));
			var task = new Task();
			using (var sw = Console.Out)
				//using (var sw = new StreamWriter("output.txt"))
			{
				task.Solve(sr, sw);
				//Console.ReadKey();
			}
		}
	}

	internal class Task
	{
		public void Solve(InputReader sr, TextWriter sw)
		{
			var s1 = sr.NextString().ToCharArray();
			var s2 = sr.NextString().ToCharArray();
			if (s2[0] == '0') {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			if (s1[0] == '0' && s1.Length == 1) {
				if (s2[0] == '0')
					sw.WriteLine("OK");
				else
					sw.WriteLine("WRONG_ANSWER");
				return;
			}
			if (s2.Length != s1.Length) {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			Array.Sort(s1);
			var myAnsw = new char[s1.Length];
			var indx = 0;
			while (indx < s1.Length && s1[indx] == '0')
				indx++;

			var answIndx = 1;
			myAnsw[0] = s1[indx];
			for (var i = 0; i < s1.Length; i++) {
				if (i != indx) {
					myAnsw[answIndx] = s1[i];
					answIndx++;
				}
			}
			if (s2.Length != myAnsw.Length) {
				sw.WriteLine("WRONG_ANSWER");
				return;
			}
			for (var i = 0; i < myAnsw.Length; i++) {
				if (s2[i] != myAnsw[i]) {
					sw.WriteLine("WRONG_ANSWER");
					return;
				}
			}

			sw.WriteLine("OK");
		}
	}
}

internal class InputReader : IDisposable
{
	private bool isDispose;
	private readonly TextReader sr;

	public InputReader(TextReader stream)
	{
		sr = stream;
	}

	public void Dispose()
	{
		Dispose(true);
		GC.SuppressFinalize(this);
	}

	public string NextString()
	{
		var result = sr.ReadLine();
		return result;
	}

	public int NextInt32()
	{
		return Int32.Parse(NextString());
	}

	public long NextInt64()
	{
		return Int64.Parse(NextString());
	}

	public string[] NextSplitStrings()
	{
		return NextString()
			.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
	}

	public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
	{
		return NextSplitStrings()
			.Select(s => func(s, CultureInfo.InvariantCulture))
			.ToArray();
	}

	public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
	{
		return
			str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
				.Select(s => func(s, CultureInfo.InvariantCulture))
				.ToArray();
	}

	protected void Dispose(bool dispose)
	{
		if (!isDispose) {
			if (dispose)
				sr.Close();
			isDispose = true;
		}
	}

	~InputReader()
	{
		Dispose(false);
	}
}

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

namespace Task1
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputStr = "";
            var inputStrCheck = "";
            do
            {
                Console.Write("Первое число: ");
                inputStr = Console.ReadLine();
                if (string.IsNullOrEmpty(inputStr) || !inputStr.Any(char.IsNumber))
                    continue;

                Console.Write("Второе число: ");
                inputStrCheck = Console.ReadLine();
                if (string.IsNullOrEmpty(inputStrCheck) || !inputStrCheck.Any(char.IsNumber))
                    continue;

                break;
            } while (true);

            var input = inputStr.ToCharArray().Select(c => int.Parse(c.ToString())).OrderBy(i => i).ToArray();
            if (input[0] == 0)
            {
                for (int i = 0; i < input.Length; i++)
                {
                    if (input[i] != 0)
                    {
                        int tmp = input[i];
                        input[i] = 0;
                        input[0] = tmp;
                        break;
                    }
                }
            }
            inputStr = "";
            input.Select(i => inputStr += i).ToArray();
            Console.WriteLine((inputStr == inputStrCheck ? "OK" : "WRONG_ANSWER"));
            Console.ReadLine();
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string num = Console.ReadLine();
            char[] arr;
            arr = num.ToCharArray(0, num.Length);
            num = Console.ReadLine();
            char[] arr2;
            arr2 = num.ToCharArray(0, num.Length);

            for (int i = 0; i < arr.Length; i++)
            {
                for (int j = i + 1; j < arr.Length; j++)
                {
                    if (arr[i] > arr[j] && (i != 0 || arr[j]!='0'))
                    {
                        char p = arr[i];
                        arr[i] = arr[j];
                        arr[j] = p;
                    }
                }
            }
            int flag = 0;
            for (int k = 0; k < arr.Length; k++)
            {
                if (arr[k] != arr2[k])
                {
                    flag = 1;
                }
            }

            if (flag==1)
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                Console.WriteLine("OK");
            }
         }
    }
}

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

namespace Задача_1
{
    class Program
    {
     static void Main(string[] args)
        {
             Console.WriteLine("введите первое число");
             string text=Console.ReadLine();//Ввод из консоли первой строки
             if (ControlInput(text)) return;  //Проверяем правильность ввода, если неправильно закрываем программу
             Console.WriteLine("введите второе число");
             string text2 = Console.ReadLine();
             if (ControlInput(text)) return;
             if (text.Length == text2.Length) //Проверяем числа на одинаковость длин
             {
                 uint[] Mass1 = new uint[text.Length];//Создаем два массива для хранения чисел
                 uint[] Mass2 = new uint[text.Length];
                 StringInMass(ref Mass1, text);//Переводим введеную строку в масив чисел
                 StringInMass(ref Mass2, text2);
                 MassObr(Mass1, Mass2);//,Сравниваем числа
             }
             else//если числа не равны по длинне
             {
                 Console.WriteLine("WRONG_ANSWER");
                 Console.ReadLine();
             }

     }

//===============Функция проверки правильности ввода========================================
     public static bool ControlInput(string Text)
     {
         Regex myReg = new Regex(@"\D"); //Создаем шаблон "любой символ кроме цифр"
         if (Text.Length > 9 || myReg.IsMatch(Text))//если число длинное и есть символы-ошибка ввода
         {
             Console.WriteLine("Слишком длинное число или введены недопустимые символы");
             Console.ReadLine();
             return true;
         }
         return false;
     }
//=======================Конец функции првоерки правильности ввода=======================

//=======================Функция Перевод введеной строки в масив чисел==========================
     public static void StringInMass(ref uint[] Mass, string text)
     {   //да, числа записываются задом наперед. НО пользователю то всеравно че внутри =)
         int lenText = text.Length; //запоминаем длинну строки
         for (int i = 0; i <= lenText - 1; i++) //бегаем пока не кончится строка
         {
             //Переводим введеную строку в число с помощью функции.
             //записываем в ячейку массива остаток от деления на десять.
             Mass[i] = Convert.ToUInt32(text) % 10;
             text = text.Remove(text.Length - 1);//убираем последний символ строки чтобы обрезать число
         }
     }
//=====================Конец Функции перевода строки в массив чисел============================

//=====================Функция Сортировки и сравнения чисел==================================================
     public static void MassObr(uint[] Mass1, uint[] Mass2)
     {

         for (int j = 0; j < Mass1.Length-1; j++)//стандартная сортировка пузырьком
         {
             for (int i = 0; i < Mass1.Length-j-1; i++)
             {
                 if (Mass1[i] < Mass1[i + 1])
                 {
                     uint b = Mass1[i];
                     Mass1[i] = Mass1[i + 1];
                     Mass1[i + 1] = b;

                 }

             }
         }

         if (Mass1[Mass1.Length - 1] == 0) //если в начале числа ведущий 0
         {

             for (int i = Mass1.Length-1; i > 0; i--) //заменеяем ноль на первое минимальное число
             {
                 if (Mass1[i - 1] != 0)
                 {
                     uint b = Mass1[i-1];
                     Mass1[i-1] = Mass1[i];
                     Mass1[Mass1.Length - 1] = b;
                     break;
                 }
             }

         }
         //Сравниваем два массива с помощью функции
         if (Mass1.SequenceEqual(Mass2)) Console.WriteLine("OK"); else Console.WriteLine("WRONG_ANSWER");
         Console.ReadLine();

     }
  //====================Конец Функции сортировки и сравниния чисел================================
        }
    }
;

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

namespace Задача_1
{
    class Program
    {
     static void Main(string[] args)
        {
          //   Console.WriteLine("введите первое число");
             string text=Console.ReadLine();//Ввод из консоли первой строки
             if (ControlInput(text)) return;  //Проверяем правильность ввода, если неправильно закрываем программу
         //    Console.WriteLine("введите второе число");
             string text2 = Console.ReadLine();
             if (ControlInput(text)) return;
             if (text.Length == text2.Length) //Проверяем числа на одинаковость длин
             {
                 uint[] Mass1 = new uint[text.Length];//Создаем два массива для хранения чисел
                 uint[] Mass2 = new uint[text.Length];
                 StringInMass(ref Mass1, text);//Переводим введеную строку в масив чисел
                 StringInMass(ref Mass2, text2);
                 MassObr(Mass1, Mass2);//,Сравниваем числа
             }
             else//если числа не равны по длинне
             {
                 Console.WriteLine("WRONG_ANSWER");
                 Console.ReadLine();
             }

     }

//===============Функция проверки правильности ввода========================================
     public static bool ControlInput(string Text)
     {
         Regex myReg = new Regex(@"\D"); //Создаем шаблон "любой символ кроме цифр"
         if (Text.Length > 9 || myReg.IsMatch(Text))//если число длинное и есть символы-ошибка ввода
         {
             Console.WriteLine("Слишком длинное число или введены недопустимые символы");
             Console.ReadLine();
             return true;
         }
         return false;
     }
//=======================Конец функции првоерки правильности ввода=======================

//=======================Функция Перевод введеной строки в масив чисел==========================
     public static void StringInMass(ref uint[] Mass, string text)
     {   //да, числа записываются задом наперед. НО пользователю то всеравно че внутри =)
         int lenText = text.Length; //запоминаем длинну строки
         for (int i = 0; i <= lenText - 1; i++) //бегаем пока не кончится строка
         {
             //Переводим введеную строку в число с помощью функции.
             //записываем в ячейку массива остаток от деления на десять.
             Mass[i] = Convert.ToUInt32(text) % 10;
             text = text.Remove(text.Length - 1);//убираем последний символ строки чтобы обрезать число
         }
     }
//=====================Конец Функции перевода строки в массив чисел============================

//=====================Функция Сортировки и сравнения чисел==================================================
     public static void MassObr(uint[] Mass1, uint[] Mass2)
     {

         for (int j = 0; j < Mass1.Length-1; j++)//стандартная сортировка пузырьком
         {
             for (int i = 0; i < Mass1.Length-j-1; i++)
             {
                 if (Mass1[i] < Mass1[i + 1])
                 {
                     uint b = Mass1[i];
                     Mass1[i] = Mass1[i + 1];
                     Mass1[i + 1] = b;

                 }

             }
         }

         if (Mass1[Mass1.Length - 1] == 0) //если в начале числа ведущий 0
         {

             for (int i = Mass1.Length-1; i > 0; i--) //заменеяем ноль на первое минимальное число
             {
                 if (Mass1[i - 1] != 0)
                 {
                     uint b = Mass1[i-1];
                     Mass1[i-1] = Mass1[i];
                     Mass1[Mass1.Length - 1] = b;
                     break;
                 }
             }

         }
         //Сравниваем два массива с помощью функции
         if (Mass1.SequenceEqual(Mass2)) Console.WriteLine("OK"); else Console.WriteLine("WRONG_ANSWER");
         Console.ReadLine();

     }
  //====================Конец Функции сортировки и сравниния чисел================================
        }
    }
;

#define Online

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

namespace CF
{
    delegate double F(double x);
    delegate decimal Fdec(decimal x);

    class Program
    {

        static void Main(string[] args)
        {

#if FileIO
            StreamReader sr = new StreamReader("input.txt");
            StreamWriter sw = new StreamWriter("output.txt");
            Console.SetIn(sr);
            Console.SetOut(sw);
#endif

            B();

#if Online
            Console.ReadLine();
#endif

#if FileIO
            sr.Close();
            sw.Close();
#endif
        }

        static void A()
        {
            string[] a = new string[3];
            for (int i = 0; i < 3; i++)
                a[i] = ReadLine();
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    if (!a[i][j].Equals(a[2 - i][2 - j]))
                    {
                        Console.WriteLine("NO");
                        return;
                    }
                }
            }
            Console.WriteLine("Yes");
        }

        static void B()
        {
            int n, m;
            n = ReadInt();
            m = ReadInt();
            int[] digits = new int[10];
            while (n != 0)
            {
                digits[n % 10]++;
                n /= 10;
            }
            int ans = 0;
            for (int i = 1; i < 10; i++)
            {
                if (digits[i] != 0)
                {
                    ans += i;
                    digits[i]--;
                    break;
                }
            }
            for (int i = 0; i < 10; i++)
            {
                while (digits[i] != 0)
                {
                    ans = ans * 10 + i;
                    digits[i]--;
                }
            }
            if (ans == m)
                Console.WriteLine("OK");
            else
                Console.WriteLine("WRONG_ANSWER");
        }

        static void C()
        {
            int left, right, up, down;
            left = right = up = down = 0;
            int a, b;
            string[] tokens = ReadArray(' ');
            a = int.Parse(tokens[0]);
            b = int.Parse(tokens[1]);
            string s = ReadLine();
            if (a == 0 && b == 0)
            {
                Console.WriteLine("Yes");
                return;
            }
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].Equals('U')) up++;
                if (s[i].Equals('D')) down++;
                if (s[i].Equals('L')) left++;
                if (s[i].Equals('R')) right++;
            }
            int _left, _right, _up, _down;
            _left = _right = _up = _down = 0;
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].Equals('U')) _up++;
                if (s[i].Equals('D')) _down++;
                if (s[i].Equals('L')) _left++;
                if (s[i].Equals('R')) _right++;
                int _a = a + _left;
                _a -= _right;
                int _b = b - _up;
                _b += _down;
                if (_a == 0 && _b == 0)
                {
                    Console.WriteLine("Yes");
                    return;
                }
                else
                {
                    int x = 0;
                    if (right - left != 0)
                        x = _a / (right - left);
                    if (up - down != 0)
                        x = _b / (up - down);

                    if (x >= 0 && (_a + x * (left - right)) == 0 && (_b + x * (down - up) == 0))
                    {
                        Console.WriteLine("Yes");
                        return;
                    }

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

        static void D()
        {

        }

        static void E()
        {

        }

        static void TestGen()
        {

        }

        static string[] ReadArray(char sep)
        {
            return Console.ReadLine().Split(sep);
        }

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

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

    public static class MyMath
    {
        public static long BinPow(long a, long n, long mod)
        {
            long res = 1;
            while (n > 0)
            {
                if ((n & 1) == 1)
                {
                    res = (res * a) % mod;
                }
                a = (a * a) % mod;
                n >>= 1;
            }
            return res;
        }

        public static long GCD(long a, long b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static int GCD(int a, int b)
        {
            while (b != 0) b = a % (a = b);
            return a;
        }

        public static long LCM(long a, long b)
        {
            return (a * b) / GCD(a, b);
        }

        public static int LCM(int a, int b)
        {
            return (a * b) / GCD(a, b);
        }
    }

    class Edge
    {
        public int a;
        public int b;
        public int w;

        public Edge(int a, int b, int w)
        {
            this.a = a;
            this.b = b;
            this.w = w;
        }
    }

    class Graph
    {
        public List<int>[] g;
        public int[] color; //0-white, 1-gray, 2-black
        public int[] o; //open
        public int[] c; //close
        public int[] p;
        public int[] d;
        public List<Edge> e;
        public Stack<int> ans = new Stack<int>();
        public Graph(int n)
        {
            g = new List<int>[n + 1];
            for (int i = 0; i <= n; i++)
                g[i] = new List<int>();
            color = new int[n + 1];
            o = new int[n + 1];
            c = new int[n + 1];
            p = new int[n + 1];
            d = new int[n + 1];
        }

        const int white = 0;
        const int gray = 1;
        const int black = 2;

        public bool DFS(int u, ref int time)
        {
            color[u] = gray;
            time++;
            o[u] = time;
            for (int i = 0; i < g[u].Count; i++)
            {
                int v = g[u][i];
                if (color[v] == gray)
                {
                    return true;
                }
                if (color[v] == white)
                {
                    p[v] = u;
                    if (DFS(v, ref time)) return true;
                }
            }
            color[u] = black;
            ans.Push(u);
            c[u] = time;
            time++;
            return false;
        }
    }

    static class GraphUtils
    {
        const int white = 0;
        const int gray = 1;
        const int black = 2;

        public static void BFS(int s, Graph g)
        {
            Queue<int> q = new Queue<int>();
            q.Enqueue(s);
            while (q.Count != 0)
            {
                int u = q.Dequeue();
                for (int i = 0; i < g.g[u].Count; i++)
                {
                    int v = g.g[u][i];
                    if (g.color[v] == white)
                    {
                        g.color[v] = gray;
                        g.d[v] = g.d[u] + 1;
                        g.p[v] = u;
                        q.Enqueue(v);
                    }
                }
                g.color[u] = black;
            }
        }

        public static bool DFS(int u, ref int time, Graph g, Stack<int> st)
        {
            g.color[u] = gray;
            time++;
            g.o[u] = time;
            for (int i = 0; i < g.g[u].Count; i++)
            {
                int v = g.g[u][i];
                if (g.color[v] == gray)
                {
                    return true;
                }
                if (g.color[v] == white)
                {
                    g.p[v] = u;
                    if (DFS(v, ref time, g, st)) return true;
                }
            }
            g.color[u] = black;
            st.Push(u);
            g.c[u] = time;
            time++;
            return false;
        }

        public static void FordBellman(int u, Graph g)
        {
            int n = g.g.Length;
            for (int i = 0; i <= n; i++)
            {
                g.d[i] = int.MaxValue;
                g.p[i] = 0;
            }

            g.d[u] = 0;

            for (int i = 0; i < n - 1; i++)
            {
                for (int j = 0; j < g.e.Count; j++)
                {
                    if (g.d[g.e[j].a] != int.MaxValue)
                    {
                        if (g.d[g.e[j].a] + g.e[j].w < g.d[g.e[j].b])
                        {
                            g.d[g.e[j].b] = g.d[g.e[j].a] + g.e[j].w;
                            g.p[g.e[j].b] = g.e[j].a;
                        }
                    }
                }
            }
        }
    }

    static class ArrayUtils
    {
        public static int BinarySearch(int[] a, int val)
        {
            int left = 0;
            int right = a.Length - 1;
            int mid;

            while (left < right)
            {
                mid = left + ((right - left) >> 1);
                if (val <= a[mid])
                {
                    right = mid;
                }
                else
                {
                    left = mid + 1;
                }
            }

            if (a[left] == val)
                return left;
            else
                return -1;
        }

        public static double Bisection(F f, double left, double right, double eps)
        {
            double mid;
            while (right - left > eps)
            {
                mid = left + ((right - left) / 2d);
                if (Math.Sign(f(mid)) != Math.Sign(f(left)))
                    right = mid;
                else
                    left = mid;
            }
            return (left + right) / 2d;
        }

        public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)
        {
            decimal m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3m;
                m2 = r - (r - l) / 3m;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static double TernarySearch(F f, double eps, double l, double r, bool isMax)
        {
            double m1, m2;
            while (r - l > eps)
            {
                m1 = l + (r - l) / 3d;
                m2 = r - (r - l) / 3d;
                if (f(m1) < f(m2))
                    if (isMax)
                        l = m1;
                    else
                        r = m2;
                else
                    if (isMax)
                        r = m2;
                    else
                        l = m1;
            }
            return r;
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R, Comparison<T> comp)
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (comp(L[i], R[j]) <= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R, comp);
            Merge_Sort(A, q + 1, r, L, R, comp);
            Merge(A, p, q, r, L, R, comp);
        }

        public static void Merge<T>(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable<T>
        {
            for (int i = p; i <= q; i++)
                L[i] = A[i];
            for (int i = q + 1; i <= r; i++)
                R[i] = A[i];

            for (int k = p, i = p, j = q + 1; k <= r; k++)
            {
                if (i > q)
                {
                    for (; k <= r; k++, j++)
                        A[k] = R[j];
                    return;
                }
                if (j > r)
                {
                    for (; k <= r; k++, i++)
                        A[k] = L[i];
                    return;
                }
                if (L[i].CompareTo(R[j]) >= 0)
                {
                    A[k] = L[i];
                    i++;
                }
                else
                {
                    A[k] = R[j];
                    j++;
                }
            }
        }

        public static void Merge_Sort<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            if (p >= r) return;
            int q = p + ((r - p) >> 1);
            Merge_Sort(A, p, q, L, R);
            Merge_Sort(A, q + 1, r, L, R);
            Merge(A, p, q, r, L, R);
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R) where T : IComparable<T>
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        public static void Merge_Sort1<T>(T[] A, int p, int r, T[] L, T[] R, Comparison<T> comp)
        {
            int k = 1;
            while (k < r - p + 1)
            {
                int i = 0;
                while (i < r)
                {
                    int _r = Math.Min(i + 2 * k - 1, r);
                    int q = Math.Min(i + k - 1, r);
                    Merge(A, i, q, _r, L, R, comp);
                    i += 2 * k;
                }
                k <<= 1;
            }
        }

        static void Shake<T>(T[] a)
        {
            Random rnd = new Random(Environment.TickCount);
            T temp;
            int b, c;
            for (int i = 0; i < a.Length; i++)
            {
                b = rnd.Next(0, a.Length);
                c = rnd.Next(0, a.Length);
                temp = a[b];
                a[b] = a[c];
                a[c] = temp;
            }
        }
    }
}

using System;
using System.Collections.Generic;

namespace cf_12b
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            int first = int.Parse(Console.ReadLine());
            int second = int.Parse(Console.ReadLine());

            int answer = GetRightAnswer (first);

            if (second == answer)
                Console.WriteLine ("OK");
            else
                Console.WriteLine ("WRONG_ANSWER");
        }

        private static int GetRightAnswer(int number) {
            if (number == 0)
                return 0;

            var digits = GetDigits(number);

            Array.Sort (digits);

            if (digits [0] == 0) {
                int i = 1;
                while (digits[i] == 0)
                    i++;

                digits [0] = digits [i];
                digits [i] = 0;
            }

            int answer = 0;
            for (int i = 0; i < digits.Length; i++) {
                answer = answer * 10 + digits [i];
            }

            return answer;
        }

        private static int[] GetDigits(int number) {
            var digits = new List<int> ();
            digits.Add (number % 10);
            number = number / 10;

            while (number > 0) {
                digits.Add (number % 10);
                number = number / 10;
            }

            return digits.ToArray();
        }
    }
}

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

class Program
{
    public static int[] Read(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        int[] ret = new int[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = int.Parse(tokens[i]);
        }

        return ret;
    }

    public static double[] ReadDouble(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        double[] ret = new double[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = double.Parse(tokens[i], CultureInfo.InvariantCulture);
        }

        return ret;
    }

    static string Reverse(string s)
    {
        char[] a = s.ToCharArray();
        Array.Reverse(a);
        return new string(a);
    }

    static List<int>[] adj;
    static bool[] visited = new bool[1 << 20];
    static int[] count = new int[20];

    static void Solve(int cur_i, int v_mask, int source_i, int len)
    {
        visited[v_mask] = true;

        for (int i = 0; i < adj[cur_i].Count; i++)
        {
            int n = adj[cur_i][i];
            if (n == source_i && len > 1)
            {
                count[len]++;
                continue;
            }
            if ((v_mask & (1 << n)) != 0) continue;
            Solve(n, v_mask | (1 << n), source_i, len + 1);
        }
    }

    static void Main(string[] args)
    {
        string n = Console.ReadLine().Trim();
        string g = Console.ReadLine().Trim();

        char[] a = n.ToCharArray();
        Array.Sort(a);
        int i = 0;
        while (i < a.Length && a[i] == '0') i++;
        if (i <= a.Length - 1)
        {
            a[0] = a[i];
            a[i] = '0';
        }
        if (a[0] == '0') Console.WriteLine("WRONG_ANSWER");
        else
        {
            string m = new string(a);
            if (m == g) Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");
        }
    }
}

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

class Program
{
    public static int[] Read(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        int[] ret = new int[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = int.Parse(tokens[i]);
        }

        return ret;
    }

    public static double[] ReadDouble(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        double[] ret = new double[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = double.Parse(tokens[i], CultureInfo.InvariantCulture);
        }

        return ret;
    }

    static string Reverse(string s)
    {
        char[] a = s.ToCharArray();
        Array.Reverse(a);
        return new string(a);
    }

    static List<int>[] adj;
    static bool[] visited = new bool[1 << 20];
    static int[] count = new int[20];

    static void Solve(int cur_i, int v_mask, int source_i, int len)
    {
        visited[v_mask] = true;

        for (int i = 0; i < adj[cur_i].Count; i++)
        {
            int n = adj[cur_i][i];
            if (n == source_i && len > 1)
            {
                count[len]++;
                continue;
            }
            if ((v_mask & (1 << n)) != 0) continue;
            Solve(n, v_mask | (1 << n), source_i, len + 1);
        }
    }

    static void Main(string[] args)
    {
        string n = Console.ReadLine().Trim();
        string g = Console.ReadLine().Trim();

        char[] a = n.ToCharArray();
        Array.Sort(a);
        int i = 0;
        while (i < a.Length && a[i] == '0') i++;
        if (i < a.Length - 1)
        {
            a[0] = a[i];
            a[i] = '0';
        }
        string m = new string(a);
        if (m == g) Console.WriteLine("OK");
        else Console.WriteLine("WRONG_ANSWER");
    }
}

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

class Program
{
    public static int[] Read(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        int[] ret = new int[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = int.Parse(tokens[i]);
        }

        return ret;
    }

    public static double[] ReadDouble(string str)
    {
        string[] tokens = str.Trim().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        double[] ret = new double[tokens.Length];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = double.Parse(tokens[i], CultureInfo.InvariantCulture);
        }

        return ret;
    }

    static string Reverse(string s)
    {
        char[] a = s.ToCharArray();
        Array.Reverse(a);
        return new string(a);
    }

    static List<int>[] adj;
    static bool[] visited = new bool[1 << 20];
    static int[] count = new int[20];

    static void Solve(int cur_i, int v_mask, int source_i, int len)
    {
        visited[v_mask] = true;

        for (int i = 0; i < adj[cur_i].Count; i++)
        {
            int n = adj[cur_i][i];
            if (n == source_i && len > 1)
            {
                count[len]++;
                continue;
            }
            if ((v_mask & (1 << n)) != 0) continue;
            Solve(n, v_mask | (1 << n), source_i, len + 1);
        }
    }

    static void Main(string[] args)
    {
        string n = Console.ReadLine().Trim();
        string g = Console.ReadLine().Trim();

        char[] a = n.ToCharArray();
        Array.Sort(a);
        int i = 0;
        while (i < a.Length && a[i] == '0') i++;
        if (i <= a.Length - 1 && a[0] == '0')
        {
            a[0] = a[i];
            a[i] = '0';
        }
        if (a[0] == '0') Console.WriteLine("WRONG_ANSWER");
        else
        {
            string m = new string(a);
            if (m == g) Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");
        }
    }
}

using System;
using System.Linq;

public class Solution
{
    public static void Main()
    {
        char[] chrIn = Console.ReadLine().ToCharArray().OrderBy(x => x).ToArray();
        string ans = Console.ReadLine();
        int n = chrIn.Length;
        int i = 0;
        while (chrIn[i] == '0')
        {
            i++;
        }
        chrIn[0] = chrIn[i];
        chrIn[i] = '0';
        if ((new string(chrIn)).Equals(ans))
        {
            Console.WriteLine("OK");
        }
        else
        {
            Console.WriteLine("WRONG_ANSWER");
        }
    }
}

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

namespace Timus
{
    class Problems
    {
        static void Main()
        {
            var n = Console.ReadLine();
            var m = Console.ReadLine();
            if (n == "0" || m == "0")
                Console.WriteLine("WRONG_ANSWER");
            else
                Console.WriteLine((GetSmallerView(n) == m) ? "OK" : "WRONG_ANSWER");
        }

        static string GetSmallerView(string n)
        {
            var _n = n.ToCharArray().Select(x => int.Parse(x.ToString())).ToList();
            var null_count = _n.Count(x => x == 0);
            _n.RemoveAll(x => x == 0);
            var min = _n.Min();
            _n.Remove(min);
            _n.Sort();
            return $"{min}{new string('0', null_count)}{string.Concat(_n)}";
        }
    }
}

using System;
using System.Collections.Generic;

namespace Application
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int a, b;
			a = int.Parse (Console.ReadLine ());
			b = int.Parse (Console.ReadLine ());
			if ((a == 0) && (b == 0)) {
				Console.WriteLine ("WRONG_ANSWER");

			} else {
				List<int> mas = new List<int> ();
				while (a!=0) {
					mas.Add (a % 10);
					a /= 10;
				}
				int index = 0;
				mas.Sort ();
				for (int i = 0; i<mas.Count; i++)
					if (mas [i] != 0) {
						index = i;
						break;
					}
				string str = mas [index].ToString ();
				for (int i=0; i<index; i++)
					str += mas [i].ToString ();
				for (int i=index+1; i<mas.Count; i++)
					str += mas [i].ToString ();
				if (b.ToString () == str)
					Console.WriteLine ("OK");
				else
					Console.WriteLine ("WRONG_ANSWER");
			}
		}
	}
}

using System;
using System.Collections.Generic;

namespace Application
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int a, b;
			a = int.Parse (Console.ReadLine ());
			b = int.Parse (Console.ReadLine ());
			if ((a == 0) && (b == 0)) {
				Console.WriteLine ("OK");

			} else {
				List<int> mas = new List<int> ();
				while (a!=0) {
					mas.Add (a % 10);
					a /= 10;
				}
				int index = 0;
				mas.Sort ();
				for (int i = 0; i<mas.Count; i++)
					if (mas [i] != 0) {
						index = i;
						break;
					}
				string str = mas [index].ToString ();
				for (int i=0; i<index; i++)
					str += mas [i].ToString ();
				for (int i=index+1; i<mas.Count; i++)
					str += mas [i].ToString ();
				if (b.ToString () == str)
					Console.WriteLine ("OK");
				else
					Console.WriteLine ("WRONG_ANSWER");
			}
		}
	}
}

using System;
using System.Collections.Generic;

namespace Application
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int a = int.Parse (Console.ReadLine ());
			string b = Console.ReadLine ();
			if ((a == 0) && (int.Parse(b) == 0)) {
				Console.WriteLine ("WRONG_ANSWER");

			} else {
				List<int> mas = new List<int> ();
				while (a!=0) {
					mas.Add (a % 10);
					a /= 10;
				}
				int index = 0;
				mas.Sort ();
				for (int i = 0; i<mas.Count; i++)
					if (mas [i] != 0) {
						index = i;
						break;
					}
				string str = mas [index].ToString ();
				for (int i=0; i<index; i++)
					str += mas [i].ToString ();
				for (int i=index+1; i<mas.Count; i++)
					str += mas [i].ToString ();
				if (b == str)
					Console.WriteLine ("OK");
				else
					Console.WriteLine ("WRONG_ANSWER");
			}
		}
	}
}

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

class Program
{
    public static void Main(string[] args)
    {
        //MulticaseTest();
        //int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int n = int.Parse(Console.ReadLine());
        int m = int.Parse(Console.ReadLine());
        // find smallest number then compare it to m
        int r = m;
        if (n > 0)
        {
            if (n.ToString().Contains('0'))
            {
                char l = n.ToString().Where(x => x != '0').OrderBy(x => x).First();
                string u = l.ToString();
                List<char> j = n.ToString().Select(x => x).ToList();
                j.Remove(l);
                r = int.Parse(u + string.Join("", j.Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
            else
            {
                r = int.Parse(string.Join("", n.ToString().Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
        }
        else
        {
            r = n;
        }
        if (r == m) Console.WriteLine("OK");
        else Console.WriteLine("WRONG_ANSWER");
    }

    public static void MulticaseTest()
    {
        //4
        //4 5 2 3
        int t = int.Parse(Console.ReadLine());
        List<string> o = new List<string>(t);
        for (int i = 0; i < t; i++)
        {
            int n = int.Parse(Console.ReadLine());
            //List<int> input = Console.ReadLine().Split().Select(int.Parse).ToList();

        }
        o.ForEach(Console.WriteLine);
    }
}

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

class Program
{
    public static void Main(string[] args)
    {
        //MulticaseTest();
        //int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int n = int.Parse(Console.ReadLine());
        int m = int.Parse(Console.ReadLine());
        // find smallest number then compare it to m
        int r = m;
        if (n > 0)
        {
            if (n.ToString().Contains('0'))
            {
                char l = n.ToString().Where(x => x != '0').OrderBy(x => x).First();
                string u = l.ToString();
                List<char> j = n.ToString().Select(x => x).ToList();
                j.Remove(l);
                r = int.Parse(u + string.Join("", j.Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
            else
            {
                r = int.Parse(string.Join("", n.ToString().Select(x => x.ToString()).Select(int.Parse).OrderBy(x => x)));
            }
        }
        else
        {
            r = n;
        }
        if (r == m) { if (n.ToString()[0] != '0') { Console.WriteLine("OK"); } else { Console.WriteLine("WRONG_ANSWER"); } }
        else Console.WriteLine("WRONG_ANSWER");
    }

    public static void MulticaseTest()
    {
        //4
        //4 5 2 3
        int t = int.Parse(Console.ReadLine());
        List<string> o = new List<string>(t);
        for (int i = 0; i < t; i++)
        {
            int n = int.Parse(Console.ReadLine());
            //List<int> input = Console.ReadLine().Split().Select(int.Parse).ToList();

        }
        o.ForEach(Console.WriteLine);
    }
}

/*******************************************************************************
* Author: Nirushuu
*******************************************************************************/

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

/*******************************************************************************
* IO from Kattio.cs from open.kattis.com/help/csharp                          */
public class NoMoreTokensException : Exception
{
}

public class Tokenizer
{
    string[] tokens = new string[0];
    private int pos;
    StreamReader reader;

    public Tokenizer(Stream inStream)
    {
        var bs = new BufferedStream(inStream);
        reader = new StreamReader(bs);
    }

    public Tokenizer() : this(Console.OpenStandardInput())
    {
        // Nothing more to do
    }

    private string PeekNext()
    {
        if (pos < 0)
            // pos < 0 indicates that there are no more tokens
            return null;
        if (pos < tokens.Length)
        {
            if (tokens[pos].Length == 0)
            {
                ++pos;
                return PeekNext();
            }
            return tokens[pos];
        }
        string line = reader.ReadLine();
        if (line == null)
        {
            // There is no more data to read
            pos = -1;
            return null;
        }
        // Split the line that was read on white space characters
        tokens = line.Split(null);
        pos = 0;
        return PeekNext();
    }

    public bool HasNext()
    {
        return (PeekNext() != null);
    }

    public string Next()
    {
        string next = PeekNext();
        if (next == null)
            throw new NoMoreTokensException();
        ++pos;
        return next;
    }
}

public class Scanner : Tokenizer
{

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public float NextFloat()
    {
        return float.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }
}

public class BufferedStdoutWriter : StreamWriter
{
    public BufferedStdoutWriter() : base(new BufferedStream(Console.OpenStandardOutput()))
    {
    }
}
/******************************************************************************/

/*******************************************************************************
* DisjointSet datastructure                                                   */
public struct DisjointSet {
    public int[] parent;
    public int[] rank;
    public DisjointSet(int n) {
        parent = new int[n];
        for (int i = 0; i < n; ++i) {
            parent[i] = i;
        }
        rank = new int[n];
    }

    public int Find(int i) {
        int idx = i;
        var compress = new List<int>();
        while (idx != parent[idx]) {
            compress.Add(idx);
            idx = parent[idx];
        }

        foreach (var e in compress) {   // path compress
            parent[e] = idx;
        }
        return idx;
    }

    public void Union(int a, int b) {
        int aPar = this.Find(a);
        int bPar = this.Find(b);

        if (rank[aPar] > rank[bPar]) {  // by rank
            parent[bPar] = aPar;
        } else {
            parent[aPar] = bPar;
        }
        if (rank[aPar] == rank[bPar]) {
            ++rank[bPar];
        }
    }
}

class MaxHeap {
    List<int> data;

    public MaxHeap() {
        data = new List<int>();
    }

    public void Add(int a) {
        data.Add(a);
        int idx = data.Count - 1;
        int parent = (int) Math.Floor((double) (idx - 1) / 2);
        while (idx != 0 && (data[idx] > data[parent])) {
            int tmp = data[parent];
            data[parent] = data[idx];
            data[idx] = tmp;

            idx = parent;
            parent = (int) Math.Floor((double) (idx - 1) / 2);
        }
    }

    public int Pop() {
        int res = data[0];
        data[0] = data[data.Count - 1];
        data.RemoveAt(data.Count - 1);

        int idx = 0;
        while (true) {
            int child1 = (2 * idx) + 1;
            int child2 = (2 * idx) + 2;

            if (child1 >= data.Count) { // no children
                break;
            } else if (child2 >= data.Count) {  // one child
                if (data[idx] < data[child1]) {
                    int tmp = data[idx];
                    data[idx] = data[child1];
                    data[child1] = tmp;
                }
                break;
            } else {    // two children
                int maxChild = data[child1] > data[child2] ? child1 : child2;
                if (data[idx] < data[maxChild]) {
                    int tmp = data[idx];
                    data[idx] = data[maxChild];
                    data[maxChild] = tmp;
                    idx = maxChild;
                    continue;
                } else {    // no swap
                    break;
                }
            }
        }

        return res;
    }

}

class Dequeue {
    public Dictionary<int, int> data = new Dictionary<int, int>();
    int firstIdx;
    public int Count;
    public Dequeue() {
        data = new Dictionary<int, int>();
        firstIdx = 1;
        Count = 0;
    }

    public void PushFront(int a) {
        data[firstIdx - 1] = a;
        ++Count;
        --firstIdx;
    }

    public void PushBack(int a) {
        data[firstIdx + Count] = a;
        ++Count;
    }

    public int PopFront() {
        --Count;
        ++firstIdx;
        return data[firstIdx - 1];
    }

    public int PopBack() {
        --Count;
        return data[firstIdx + Count];
    }

    public int Get(int n) {
        return data[firstIdx + n];
    }
}
/******************************************************************************/

class MainClass {

    // Debug functions
    static void debug<T>(IEnumerable<T> a, string s = "") {
        Console.WriteLine($"name: {s}");
        int i = 0;
        foreach (var e in a) {
            Console.WriteLine($"value {i}: {e}");
            ++i;
        }
    }
    static void dbg<T>(T a, string s = "") {
        Console.WriteLine($"name: {s} value: {a}");
    }
    ////////////////////

    static int gcd(int a, int b) {
        while (b != 0) {
            int t = b;
            b = a % b;
            a = t;
        }
        return a;
    }

    static bool between(int a, int b, int c) {
        return (a >= b && a <= c);
    }

    static int findIn(string s, string a) {
        for (int i = 0; i < s.Length - (a.Length - 1); ++i) {
            bool found = true;
            for (int j = 0; j < a.Length; ++j) {
                if (s[i + j] != a[j]) {
                    found = false;
                    break;
                }
            }

            if (found) {
                return i;
            }
        }

        return -1;
    }

    static double dist(double a, double b, double c, double d) {
        return Math.Sqrt(Math.Pow((a - c), 2) + Math.Pow((b - d), 2));
    }

    public static void Main() {

        var sc = new Scanner();
        var wr = new BufferedStdoutWriter();
        var dot = new NumberFormatInfo();
        dot.NumberDecimalSeparator = ".";

        var n = new List<char>(sc.Next());
        var m = new List<char>(sc.Next());

        n.Sort();
        for (int i = 0; i < n.Count; ++i) {
            if (n[i] != '0') {
                char t = n[i];
                n[i] = '0';
                n[0] = t;
                break;
            }
        }

        for (int i = 0; i < n.Count; ++i) {
            if (i >= m.Count || n[i] != m[i]) {
                wr.Write("WRONG_ANSWER");
                wr.Flush();
                return;
            }
        }

        wr.Write("OK");

        wr.Flush();

    }
}

using System;
using System.IO;
using System.Reflection;

namespace ConsoleApplication1
{
    class Program
    {
        static void OpenConsole()
        {
            string strAppDir =
                        Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            Console.SetIn(new StreamReader(strAppDir + "\\input.txt"));
            Console.SetOut(new StreamWriter(strAppDir + "\\output.txt"));
        }

        static void CloseConsole()
        {
            Console.In.Close();
            Console.Out.Close();
        }

        static void Solve()
        {
            string[] t = Console.In.ReadToEnd().Split(new char[3] { ' ', '\n', '\r' },
                StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(t[0]);
            string m = t[1];
            if (n == 0)
            {
                if (m == "0") Console.Write("OK");
                else Console.Write("WRONG_ANSWER");
                return;
            }
            if (m[0] == '0')
            {
                Console.Write("WRONG_ANSWER");
                return;
            }
            char[] tt = t[0].ToCharArray();
            Array.Sort(tt);
            int i = 0;
            while (i < tt.Length && tt[i] == '0') i++;
            if (i == tt.Length)
            {
                Console.Write("WRONG_ANSWER");
                return;
            }
            tt[0] = tt[i];
            tt[i] = '0';
            if (int.Parse(t[1]) == int.Parse(new string(tt)))
            {
                Console.Write("OK");
            }
            else
            {
                Console.Write("WRONG_ANSWER");
            }
        }

        static void Main(string[] args)
        {
#if !ONLINE_JUDGE
            OpenConsole();
#endif
            Solve();
#if !ONLINE_JUDGE
            CloseConsole();
#endif
        }
    }
}

using System;
using System.IO;
using System.Reflection;

namespace ConsoleApplication1
{
    class Program
    {
        static void OpenConsole()
        {
            string strAppDir =
                        Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            Console.SetIn(new StreamReader(strAppDir + "\\input.txt"));
            Console.SetOut(new StreamWriter(strAppDir + "\\output.txt"));
        }

        static void CloseConsole()
        {
            Console.In.Close();
            Console.Out.Close();
        }

        static void Solve()
        {
            string[] t = Console.In.ReadToEnd().Split(new char[3] { ' ', '\n', '\r' },
                StringSplitOptions.RemoveEmptyEntries);
            int n = int.Parse(t[0]);
            string m = t[1];
            if (n == 0)
            {
                if (m == "0") Console.Write("OK");
                else Console.Write("WRONG_ANSWER");
                return;
            }
            char[] tt = t[0].ToCharArray();
            Array.Sort(tt);
            int i = 0;
            while (i < tt.Length && tt[i] == '0') i++;
            if (i == tt.Length)
            {
                Console.Write("WRONG_ANSWER");
                return;
            }
            tt[0] = tt[i];
            tt[i] = '0';
            if (int.Parse(t[1]) == int.Parse(new string(tt)))
            {
                Console.Write("OK");
            }
            else
            {
                Console.Write("WRONG_ANSWER");
            }
        }

        static void Main(string[] args)
        {
#if !ONLINE_JUDGE
            OpenConsole();
#endif
            Solve();
#if !ONLINE_JUDGE
            CloseConsole();
#endif
        }
    }
}

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

namespace acm{
    class Program{
#if DEBUG
        static bool file = true;
        static TextReader fin = new StreamReader("input.txt");
        static TextWriter fout = new StreamWriter("output.txt");
        static void open(bool f) { if (f) { Console.SetIn(fin); Console.SetOut(fout);  } }
        static void close(bool f) { if (f) fout.Close(); }
#endif
        static void swap<T>(ref T a, ref T b) { T t = a; a = b; b = t; }
        static void print(object o) { Console.Write(o); }
        static void print(String f, params object[] o) { Console.WriteLine(f, o); }
        static void println() { Console.WriteLine(); }
        static void println(object o) { Console.WriteLine(o); }
        static void println(String f, params object[] o) { Console.WriteLine(f, o); }
        static string RL() { return Console.ReadLine(); }

        static void Main(string[] args) {
#if DEBUG
            open(file);
#endif
			string n1=Console.ReadLine().Trim(), n2=Console.ReadLine().Trim();
			int[] digits=new int[n1.Length];

			for(int i=0; i<n1.Length; i++){
				digits[i]=int.Parse(""+n1[i]);
			}

			Array.Sort(digits);

			if (digits[0]!=0){
				string t="";
				foreach(int v in digits) t+=v.ToString();
				if (int.Parse(t)==int.Parse(n2)) println("OK");
				else println("WRONG_ANSWER");
			} else {
				int k=0;
				for(;k<digits.Length && digits[k]==0; k++);
				swap(ref digits[0], ref digits[k-1]);
				string t="";
				foreach(int v in digits) t+=v.ToString();
				if (int.Parse(t)==int.Parse(n2)) println("OK");
				else println("WRONG_ANSWER");
			}

#if DEBUG
            close(file);
#endif
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string input = Console.ReadLine();
            string output = Console.ReadLine();
            if (input.Length != output.Length) goto State;
            int b = int.Parse(input);
            int[] a = new int[input.Length];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = b % 10;
                b = b / 10;
            }
            BubbleSort(ref a);
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] > 0)
                {
                    int temp = a[i];
                    a[i] = a[0];
                    a[0] = temp;
                    break;
                }
            }
            int x = 0;
            for (int i = 0; i < a.Length; i++)
            {
                x = x * 10 + a[i];
            }
            if (x == int.Parse(output)) { Console.WriteLine("OK"); }
            else { Console.WriteLine("WRONG_ANSWER"); }
        State:
            Console.WriteLine("WRONG_ANSWER");
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string req = Console.ReadLine();
            int answer = int.Parse(Console.ReadLine());
            int[] first = new int[req.Length];
            for (int i = 0; i < req.Length; i++)
            {
                first[i] = int.Parse(req.Substring(i, 1));
            }
            BubbleSort(ref first);
            if (first[0] == 0)
            {
                for (int i = 1; i < first.Length; i++)
                {
                    if (first[i] > 0) { int temp = first[i]; first[i] = first[0]; first[0] = temp; break; }
                }
            }
            int request = 0;
            for (int i = 0; i < first.Length; i++)
            {
                request = request * 10 + first[i];
            }
            Console.WriteLine((request == answer) ? "OK" : "WRONG_ANSWER");
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string req = Console.ReadLine();
            int answer = int.Parse(Console.ReadLine());
            int[] first = new int[req.Length];
            for (int i = 0; i < req.Length; i++)
            {
                first[i] = int.Parse(req.Substring(i, 1));
            }
            BubbleSort(ref first);
            for (int i = 1; i < first.Length; i++)
            {
                if (first[i] > 0)
                {
                    if (i != 0) { int temp = first[i]; first[i] = first[0]; first[0] = temp; }
                    break;
                }
            }
            int request = 0;
            for (int i = 0; i < first.Length; i++)
            {
                request = request * 10 + first[i];
            }
            Console.WriteLine((request == answer) ? "OK" : "WRONG_ANSWER");
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string input = Console.ReadLine();
            string output = Console.ReadLine();
            int b = int.Parse(input);
            int[] a = new int[input.Length];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = b % 10;
                b = b / 10;
            }
            BubbleSort(ref a);
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] > 0)
                {
                    int temp = a[i];
                    a[i] = a[0];
                    a[0] = temp;
                    break;
                }
            }
            int x = 0;
            for (int i = 0; i < a.Length; i++)
            {
                x = x * 10 + a[i];
            }
            //Console.WriteLine(x);
            if (x == int.Parse(output)) { Console.WriteLine("OK"); }
            else { Console.WriteLine("WRONG_ANSWER"); }
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string req = Console.ReadLine();
            int answer = int.Parse(Console.ReadLine());
            int[] first = new int[req.Length];
            for (int i = 0; i < req.Length; i++)
            {
                first[i] = int.Parse(req.Substring(i, 1));
            }
            BubbleSort(ref first);
            for (int i = 0; i < first.Length; i++)
            {
                if (first[i] > 0)
                {
                    if (i != 0) { int temp = first[0]; first[0] = first[i]; first[i] = temp; }
                    break;
                }
            }
            int request = 0;
            for (int i = 0; i < first.Length; i++)
            {
                request = request * 10 + first[i];
            }
            Console.WriteLine((request == answer) ? "OK" : "WRONG_ANSWER");
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace Saba
{
    public class Hello1
    {
        public static void Main()
        {
            string req = Console.ReadLine();
            int answer = int.Parse(Console.ReadLine());
            int[] first = new int[req.Length];
            for (int i = 0; i < req.Length; i++)
            {
                first[i] = int.Parse(req.Substring(i, 1));
            }
            BubbleSort(ref first);
            for (int i = 0; i < first.Length; i++)
            {
                if (first[i] > 0)
                {
                    if (i != 0) { int temp = first[i]; first[i] = first[0]; first[0] = temp; }
                    break;
                }
            }
            int request = 0;
            for (int i = 0; i < first.Length; i++)
            {
                request = request * 10 + first[i];
            }
            Console.WriteLine((request == answer) ? "OK" : "WRONG_ANSWER");
        }

        public static void BubbleSort(ref int[] a)
        {
            while (true)
            {
                bool isFound = false;
                for (int j = 0; j < a.Length - 1; j++)
                {
                    if (a[j] > a[j + 1])
                    {
                        int temp = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = temp;
                        isFound = true;
                    }
                }
                if (!isFound) break;
            }
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int ask = 0;
            int answer = 0;
            Program p = new Program();

            ask = Convert.ToInt32(Console.ReadLine());
            answer = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(int ask, int answer)
        {
            int i = 0;
            int len = 0;
            int temp = 0;

            int[] a1 = null;
            int[] a2 = null;

            string s1 = "";
            string s2 = "";

            string result = "WRONG_ANSWER";

            char[] c1 = ask.ToString().ToCharArray();
            char[] c2 = answer.ToString().ToCharArray();

            if (c1.Length == c2.Length)
            {
                len = c1.Length;
                a1 = new int[len];
                a2 = new int[len];

                for (i = 0; i < len; i++)
                {
                    a1[i] = c1[i] - '0';
                    a2[i] = c2[i] - '0';
                }
                Array.Sort(a1);
                Array.Sort(a2);

                for (i = 0; i < len; i++)
                {
                    s1 += a1[i];
                    s2 += a2[i];
                }

                if (s1 == s2)
                {
                    for (i = 0; i < len; i++)
                    {
                        if (a1[i] != 0)
                        {
                            temp = a1[i];
                            a1[i] = a1[0];
                            a1[0] = temp;

                            break;
                        }
                    }

                    s1 = "";
                    for (i = 0; i < len; i++)
                    {
                        s1 += a1[i];
                    }

                    if (Convert.ToInt32(s1) == answer)
                    {
                        result = "OK";
                    }
                }
            }

            return result;
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int ask = 0;
            int answer = 0;
            Program p = new Program();

            ask = Convert.ToInt32(Console.ReadLine());
            answer = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(long ask, long answer)
        {
            long min = FindMinNumber(ask);
            string result = "WRONG_ANSWER";

            if (min == answer)
            {
                result = "OK";
            }

            return result;
        }

        public long FindMinNumber(long source)
        {
            int i = 0;
            int temp = 0;
            string str = source.ToString();
            char[] digits = source.ToString().ToCharArray();
            int[] d = new int[digits.Length];

            if (source > 9)
            {
                for (i = 0; i < digits.Length; i++)
                {
                    d[i] = digits[i] - '0';
                }

                Array.Sort(d);

                for (i = 0; i < digits.Length; i++)
                {
                    if (d[i] != 0)
                    {
                        temp = d[i];
                        d[i] = d[0];
                        d[0] = temp;

                        break;
                    }
                }

                str = "";
                for (i = 0; i < digits.Length; i++)
                {
                    str += d[i];
                }
            }

            return Convert.ToInt64(str);
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int ask = 0;
            int answer = 0;
            Program p = new Program();

            ask = Convert.ToInt32(Console.ReadLine());
            answer = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(int ask, int answer)
        {
            int i = 0;
            int len = 0;
            int temp = 0;

            int[] a1 = null;
            int[] a2 = null;

            string s1 = "";
            string s2 = "";

            string result = "WRONG_ANSWER";

            char[] c1 = ask.ToString().ToCharArray();
            char[] c2 = answer.ToString().ToCharArray();

            if (ask < 10)
            {
                result = ask == answer ? "OK" : "WRONG_ANSWER";
            }
            else
            {
                if (c1.Length == c2.Length)
                {
                    len = c1.Length;
                    a1 = new int[len];
                    a2 = new int[len];

                    for (i = 0; i < len; i++)
                    {
                        a1[i] = c1[i] - '0';
                        a2[i] = c2[i] - '0';
                    }
                    Array.Sort(a1);
                    Array.Sort(a2);

                    for (i = 0; i < len; i++)
                    {
                        s1 += a1[i];
                        s2 += a2[i];
                    }

                    if (s1 == s2)
                    {
                        for (i = 0; i < len; i++)
                        {
                            if (a1[i] != 0)
                            {
                                temp = a1[i];
                                a1[i] = a1[0];
                                a1[0] = temp;

                                break;
                            }
                        }

                        s1 = "";
                        for (i = 0; i < len; i++)
                        {
                            s1 += a1[i];
                        }

                        if (Convert.ToInt32(s1) == answer)
                        {
                            result = "OK";
                        }
                    }
                }
            }

            return result;
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            long ask = 0;
            long answer = 0;
            Program p = new Program();

            ask = Convert.ToInt64(Console.ReadLine());
            answer = Convert.ToInt64(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(long ask, long answer)
        {
            long min = FindMinNumber(ask);
            string result = "WRONG_ANSWER";

            if (min == answer)
            {
                result = "OK";
            }

            return result;
        }

        public long FindMinNumber(long source)
        {
            int i = 0;
            int temp = 0;
            string str = source.ToString();
            char[] digits = source.ToString().ToCharArray();
            int[] d = new int[digits.Length];

            if (source > 9)
            {
                for (i = 0; i < digits.Length; i++)
                {
                    d[i] = digits[i] - '0';
                }

                Array.Sort(d);

                for (i = 0; i < digits.Length; i++)
                {
                    if (d[i] != 0)
                    {
                        temp = d[i];
                        d[i] = d[0];
                        d[0] = temp;

                        break;
                    }
                }

                str = "";
                for (i = 0; i < digits.Length; i++)
                {
                    str += d[i];
                }
            }

            return Convert.ToInt64(str);
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int ask = 0;
            int answer = 0;
            Program p = new Program();

            ask = Convert.ToInt32(Console.ReadLine());
            answer = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(long ask, long answer)
        {
            long min = FindMinNumber(ask);
            string result = "WRONG_ANSWER";

            if (min == answer)
            {
                result = "OK";
            }

            return result;
        }

        public long FindMinNumber(long source)
        {
            int i = 0;
            int temp = 0;
            string str = source.ToString();
            char[] digits = source.ToString().ToCharArray();
            int[] d = new int[digits.Length];

            if (source > 9)
            {
                for (i = 0; i < digits.Length; i++)
                {
                    d[i] = digits[i] - '0';
                }

                Array.Sort(d);

                for (i = 0; i < digits.Length; i++)
                {
                    if (d[i] != 0)
                    {
                        temp = d[i];
                        d[i] = d[0];
                        d[0] = temp;

                        break;
                    }
                }

                str = "";
                for (i = 0; i < digits.Length; i++)
                {
                    str += d[i];
                }
            }

            return Convert.ToInt32(str);
        }
    }
}

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

namespace CodeForces
{
    class Program
    {
        static void Main(string[] args)
        {
            int ask = 0;
            int answer = 0;
            Program p = new Program();

            ask = Convert.ToInt32(Console.ReadLine());
            answer = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(p.CorrectAnswer(ask, answer));
        }

        public string CorrectAnswer(int ask, int answer)
        {
            int min = FindMinNumber(ask);
            string result = "WRONG_ANSWER";

            if (min == answer)
            {
                result = "OK";
            }

            return result;
        }

        public int FindMinNumber(int source)
        {
            int i = 0;
            int temp = 0;
            string str = source.ToString();
            char[] digits = source.ToString().ToCharArray();
            int[] d = new int[digits.Length];

            if (source > 9)
            {
                for (i = 0; i < digits.Length; i++)
                {
                    d[i] = digits[i] - '0';
                }

                Array.Sort(d);

                for (i = 0; i < digits.Length; i++)
                {
                    if (d[i] != 0)
                    {
                        temp = d[i];
                        d[i] = d[0];
                        d[0] = temp;

                        break;
                    }
                }

                str = "";
                for (i = 0; i < digits.Length; i++)
                {
                    str += d[i];
                }
            }

            return Convert.ToInt32(str);
        }
    }
}

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

namespace Codeforces.TaskB
{
    public class Task
    {
        void Solve()
        {
            Input.Next(out long n);
            Input.Next(out string m);

            var ns = n.ToString();
            var ni = new List<int>();
            for (int i = 0; i < ns.Length; i++)
            {
                ni.Add(int.Parse($"{ns[i]}"));
            }

            ni.Sort();
            var numbers = ni.Distinct();
            var min = numbers.First();
            if (min == 0) //0123456789
            {
                if (numbers.Count() <= 1)
                {
                    Console.WriteLine("WRONG_ANSWER");
                    return;
                }

                var secondMin = numbers.Skip(1).First();
                StringBuilder sb = new StringBuilder();
                sb.Append(secondMin);
                sb.Append('0', ni.Count(i => i == 0));
                sb.Append(secondMin.ToString()[0], ni.Count(i => i == secondMin) - 1);
                sb.Append(string.Join("", ni.Where(i => i != 0 && i != secondMin).OrderBy(i => i)));

                if (sb.ToString() == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else //123456789
            {
                if (string.Join("", ni) == m)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }

        public static void Main()
        {
            var task = new Task();
            #if DEBUG
            task.Solve();
            #else
            try
            {
                task.Solve();
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex);
            }
            #endif
        }
    }
}

namespace Codeforces
{
    public class Input
    {
        private static string _line;

        public static bool Next()
        {
            _line = Console.ReadLine();
            return _line != null;
        }

        public static bool Next(out long a)
        {
            var ok = Next();
            a = ok ? long.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out long a, out long b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out long a, out long b, out long c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d, out long e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a)
        {
            var ok = Next();
            a = ok ? int.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out int a, out int b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out int a, out int b, out int c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e, out int f)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
                f = array[5];
            }
            else
            {
                a = b = c = d = e = f = 0;
            }
            return ok;
        }

        public static IEnumerable<long> ArrayLong()
        {
            return !Next() ? new List<long>() : _line.Split().Select(long.Parse);
        }

        public static IEnumerable<int> ArrayInt()
        {
            return !Next() ? new List<int>() : _line.Split().Select(int.Parse);
        }

        public static bool Next(out string value)
        {
            value = string.Empty;
            if (!Next()) return false;
            value = _line;
            return true;
        }
    }

    public class DisjointSet
    {
        private readonly int[] _parent;
        private readonly int[] _rank;
        public int Count { get; private set; }

        public DisjointSet(int count, int initialize = 0)
        {
            Count = count;
            _parent = new int[Count];
            _rank = new int[Count];
            for (var i = 0; i < initialize; i++) _parent[i] = i;
        }

        private DisjointSet(int count, int[] parent, int[] rank)
        {
            Count = count;
            _parent = parent;
            _rank = rank;
        }

        public void Add(int v)
        {
            _parent[v] = v;
            _rank[v] = 0;
        }

        public int Find_Recursive(int v)
        {
            if (_parent[v] == v) return v;
            return _parent[v] = Find(_parent[v]);
        }

        public int Find(int v)
        {
            if (_parent[v] == v) return v;
            var last = v;
            while (_parent[last] != last) last = _parent[last];
            while (_parent[v] != v)
            {
                var t = _parent[v];
                _parent[v] = last;
                v = t;
            }
            return last;
        }

        public int this[int v]
        {
            get { return Find(v); }
            set { Union(v, value); }
        }

        public void Union(int a, int b)
        {
            a = Find(a);
            b = Find(b);
            if (a == b) return;
            if (_rank[a] < _rank[b])
            {
                var t = _rank[a];
                _rank[a] = _rank[b];
                _rank[b] = t;
            }
            _parent[b] = a;
            if (_rank[a] == _rank[b]) _rank[a]++;
        }

        public int GetSetCount()
        {
            var result = 0;
            for (var i = 0; i < Count; i++)
            {
                if (_parent[i] == i) result++;
            }
            return result;
        }

        public DisjointSet Clone()
        {
            var rank = new int[Count];
            _rank.CopyTo(rank, 0);
            var parent = new int[Count];
            _parent.CopyTo(parent, 0);
            return new DisjointSet(Count, parent, rank);
        }

        public override string ToString()
        {
            return string.Join(",", _parent.Take(50));
        }
    }

    public class Matrix
    {
        public static Matrix Create(int i, int j)
        {
            var m = new Matrix(i, j);
            return m;
        }

        public static Matrix Create(int i)
        {
            var m = new Matrix(i, i);
            return m;
        }

        public long Modulo { get; set; }

        private readonly int _width;
        private readonly int _height;
        private readonly long[,] _data;
        public int Width { get { return _width; } }
        public int Height { get { return _height; } }

        private Matrix(int i, int j)
        {
            Modulo = 1000000000000000000L;
            _width = j;
            _height = i;
            _data = new long[_height, _width];
        }

        public static Matrix operator *(Matrix m1, Matrix m2)
        {
            if (m1.Width != m2.Height) throw new InvalidDataException("m1.Width != m2.Height");
            var m = Create(m2.Width, m1.Height);
            m.Modulo = m1.Modulo;
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                {
                    for (var k = 0; k < m1.Width; k++)
                        m[j, i] += (m1[j, k] * m2[k, i]) % m1.Modulo;
                    m[j, i] %= m1.Modulo;
                }
            return m;
        }

        public static Matrix operator +(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] + m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator -(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] - m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator *(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] * l) % m.Modulo;
            return m;
        }

        public static Matrix operator *(long l, Matrix m1)
        {
            return m1 * l;
        }

        public static Matrix operator +(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                m[i, i] = (m[i, i] + l) % m.Modulo;
            return m;
        }

        public static Matrix operator +(long l, Matrix m1)
        {
            return m1 + l;
        }

        public static Matrix operator -(Matrix m1, long l)
        {
            return m1 + (-l);
        }

        public static Matrix operator -(long l, Matrix m1)
        {
            var m = m1.Clone() * -1;
            return m + l;
        }

        public Matrix BinPower(long l)
        {
            var n = 1;
            var m = Clone();
            var result = new Matrix(m.Height, m.Width) + 1;
            result.Modulo = m.Modulo;
            while (l != 0)
            {
                var i = l & ~(l - 1);
                l -= i;
                while (n < i)
                {
                    m = m * m;
                    n <<= 1;
                }
                result *= m;
            }
            return result;
        }

        public void Fill(long l)
        {
            l %= Modulo;
            for (var i = 0; i < _height; i++)
                for (var j = 0; j < _width; j++)
                    _data[i, j] = l;
        }

        public Matrix Clone()
        {
            var m = new Matrix(_width, _height);
            Array.Copy(_data, m._data, _data.Length);
            m.Modulo = Modulo;
            return m;
        }

        public long this[int i, int j]
        {
            get { return _data[i, j]; }
            set { _data[i, j] = value % Modulo; }
        }
    }

    public class RedBlackTree<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTree(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key, TValue value)
        {
            var node = new Node { Key = key, Value = value, Red = true };
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
                node.Value = deleted.Value;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        public TValue this[TKey key]
        {
            get
            {
                var node = _search(key);
                return node == null ? default(TValue) : node.Value;
            }
            set
            {
                var node = _search(key);
                if (node == null) Add(key, value);
                else node.Value = value;
            }
        }

        public bool Check()
        {
            int count;
            return _root == null || _root.Check(out count);
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        [DebuggerDisplay("{ToString()}")]
        private sealed class Node
        {
            public TKey Key;
            public TValue Value;
            public bool Red;

            public Node Parent;
            public Node Left;
            public Node Right;

            public bool Check(out int count)
            {
                count = 0;
                if (Red)
                {
                    if (Left != null && Left.Red) return false;
                    if (Right != null && Right.Red) return false;
                }
                var left = 0;
                var right = 0;
                if (Left != null && !Left.Check(out left)) return false;
                if (Right != null && !Right.Check(out right)) return false;
                count = left + (Red ? 0 : 1);
                if (left != right)
                {
                    ;
                }
                return left == right;
            }

            public override string ToString()
            {
                return ToShortString(2);
            }

            private string ToShortString(int depth = 0)
            {
                return depth == 0
                    ? string.Format("{0}{1}", Red ? "*" : "", Key)
                    : string.Format("({1}<{0}>{2})", ToShortString(), Left == null ? "null" : Left.ToShortString(depth - 1), Right == null ? "null" : Right.ToShortString(depth - 1));
            }
        }

        #endregion

        #region IEnumerable

        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }

    public class RedBlackTreeSimple<TKey>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTreeSimple(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key)
        {
            var node = new Node(key);
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        private sealed class Node
        {
            public Node(TKey key)
            {
                Key = key;
            }

            public TKey Key;
            public bool Red = true;

            public Node Parent;
            public Node Left;
            public Node Right;
        }

        #endregion
    }

    /// <summary>
    /// Fenwick tree for summary on the array
    /// </summary>
    public class FenwickSum
    {
        public readonly int Size;
        private readonly int[] _items;
        public FenwickSum(int size)
        {
            Size = size;
            _items = new int[Size];
        }

        public FenwickSum(IList<int> items)
            : this(items.Count)
        {
            for (var i = 0; i < Size; i++)
                Increase(i, items[i]);
        }

        private int Sum(int r)
        {
            if (r < 0) return 0;
            if (r >= Size) r = Size - 1;
            var result = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
                result += _items[r];
            return result;
        }

        private int Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public int this[int r]
        {
            get { return Sum(r); }
        }

        public int this[int l, int r]
        {
            get { return Sum(l, r); }
        }

        public void Increase(int i, int delta)
        {
            for (; i < Size; i = i | (i + 1))
                _items[i] += delta;
        }
    }

    /// <summary>
    /// Prime numbers
    /// </summary>
    public class Primes
    {
        /// <summary>
        /// Returns prime numbers in O(n)
        /// Returns lowet divisors as well
        /// Memory O(n)
        /// </summary>
        public static void ImprovedSieveOfEratosthenes(int n, out int[] lp, out List<int> pr)
        {
            lp = new int[n];
            pr = new List<int>();
            for (var i = 2; i < n; i++)
            {
                if (lp[i] == 0)
                {
                    lp[i] = i;
                    pr.Add(i);
                }
                foreach (var prJ in pr)
                {
                    var prIj = i * prJ;
                    if (prJ <= lp[i] && prIj <= n - 1)
                    {
                        lp[prIj] = prJ;
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }

        /// <summary>
        /// Returns prime numbers in O(n*n)
        /// </summary>
        public static void SieveOfEratosthenes(int n, out List<int> pr)
        {
            var m = 50000;//(int)(3l*n/(long)Math.Log(n)/2);
            pr = new List<int>();
            var f = new bool[m];
            for (var i = 2; i * i <= n; i++)
                if (!f[i])
                    for (var j = (long)i * i; j < m && j * j < n; j += i)
                        f[j] = true;
            pr.Add(2);
            for (var i = 3; i * i <= n; i += 2)
                if (!f[i])
                    pr.Add(i);
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static int Gcd(int x, int y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static long Gcd(long x, long y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static BigInteger Gcd(BigInteger x, BigInteger y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Returns all divisors of n in O(√n)
        /// </summary>
        public static IEnumerable<long> GetDivisors(long n)
        {
            long r;
            while (true)
            {
                var x = Math.DivRem(n, 2, out r);
                if (r != 0) break;
                n = x;
                yield return 2;
            }
            var i = 3;
            while (i <= Math.Sqrt(n))
            {
                var x = Math.DivRem(n, i, out r);
                if (r == 0)
                {
                    n = x;
                    yield return i;
                }
                else i += 2;
            }
            if (n != 1) yield return n;
        }
    }

    /// <summary>
    /// Graph matching algorithms
    /// </summary>
    public class GraphMatching
    {
        #region Kuhn algorithm

        /// <summary>
        /// Kuhn algorithm for finding maximal matching
        /// in bipartite graph
        /// Vertexes are numerated from zero: 0, 1, 2, ... n-1
        /// Return array of matchings
        /// </summary>
        public static int[] Kuhn(List<int>[] g, int leftSize, int rightSize)
        {
            Debug.Assert(g.Count() == leftSize);

            var matching = new int[leftSize];
            for (var i = 0; i < rightSize; i++)
                matching[i] = -1;
            var used = new bool[leftSize];

            for (var v = 0; v < leftSize; v++)
            {
                Array.Clear(used, 0, leftSize);
                _kuhn_dfs(v, g, matching, used);
            }

            return matching;
        }

        private static bool _kuhn_dfs(int v, List<int>[] g, int[] matching, bool[] used)
        {
            if (used[v]) return false;
            used[v] = true;
            for (var i = 0; i < g[v].Count; i++)
            {
                var to = g[v][i];
                if (matching[to] == -1 || _kuhn_dfs(matching[to], g, matching, used))
                {
                    matching[to] = v;
                    return true;
                }
            }
            return false;
        }

        #endregion
    }
}

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

namespace Codeforces.TaskB
{
    public class Task
    {
        void Solve()
        {
            Input.Next(out long n);
            Input.Next(out long m);

            var ns = n.ToString();
            var ni = new List<int>();
            for (int i = 0; i < ns.Length; i++)
            {
                ni.Add(int.Parse($"{ns[i]}"));
            }

            ni.Sort();
            var numbers = ni.Distinct();
            var min = numbers.First();
            if (min == 0) //0123456789
            {
                if (numbers.Count() <= 1)
                {
                    Console.WriteLine("WRONG_ANSWER");
                    return;
                }

                var secondMin = numbers.Skip(1).First();
                StringBuilder sb = new StringBuilder();
                sb.Append(secondMin);
                sb.Append('0', ni.Count(i => i == 0));
                sb.Append(secondMin.ToString()[0], ni.Count(i => i == secondMin) - 1);
                sb.Append(string.Join("", ni.Where(i => i != 0 && i != secondMin).OrderBy(i => i)));

                if (sb.ToString() == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else //123456789
            {
                if (string.Join("", ni) == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }

        public static void Main()
        {
            var task = new Task();
            #if DEBUG
            task.Solve();
            #else
            try
            {
                task.Solve();
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex);
            }
            #endif
        }
    }
}

namespace Codeforces
{
    public class Input
    {
        private static string _line;

        public static bool Next()
        {
            _line = Console.ReadLine();
            return _line != null;
        }

        public static bool Next(out long a)
        {
            var ok = Next();
            a = ok ? long.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out long a, out long b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out long a, out long b, out long c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d, out long e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a)
        {
            var ok = Next();
            a = ok ? int.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out int a, out int b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out int a, out int b, out int c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e, out int f)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
                f = array[5];
            }
            else
            {
                a = b = c = d = e = f = 0;
            }
            return ok;
        }

        public static IEnumerable<long> ArrayLong()
        {
            return !Next() ? new List<long>() : _line.Split().Select(long.Parse);
        }

        public static IEnumerable<int> ArrayInt()
        {
            return !Next() ? new List<int>() : _line.Split().Select(int.Parse);
        }

        public static bool Next(out string value)
        {
            value = string.Empty;
            if (!Next()) return false;
            value = _line;
            return true;
        }
    }

    public class DisjointSet
    {
        private readonly int[] _parent;
        private readonly int[] _rank;
        public int Count { get; private set; }

        public DisjointSet(int count, int initialize = 0)
        {
            Count = count;
            _parent = new int[Count];
            _rank = new int[Count];
            for (var i = 0; i < initialize; i++) _parent[i] = i;
        }

        private DisjointSet(int count, int[] parent, int[] rank)
        {
            Count = count;
            _parent = parent;
            _rank = rank;
        }

        public void Add(int v)
        {
            _parent[v] = v;
            _rank[v] = 0;
        }

        public int Find_Recursive(int v)
        {
            if (_parent[v] == v) return v;
            return _parent[v] = Find(_parent[v]);
        }

        public int Find(int v)
        {
            if (_parent[v] == v) return v;
            var last = v;
            while (_parent[last] != last) last = _parent[last];
            while (_parent[v] != v)
            {
                var t = _parent[v];
                _parent[v] = last;
                v = t;
            }
            return last;
        }

        public int this[int v]
        {
            get { return Find(v); }
            set { Union(v, value); }
        }

        public void Union(int a, int b)
        {
            a = Find(a);
            b = Find(b);
            if (a == b) return;
            if (_rank[a] < _rank[b])
            {
                var t = _rank[a];
                _rank[a] = _rank[b];
                _rank[b] = t;
            }
            _parent[b] = a;
            if (_rank[a] == _rank[b]) _rank[a]++;
        }

        public int GetSetCount()
        {
            var result = 0;
            for (var i = 0; i < Count; i++)
            {
                if (_parent[i] == i) result++;
            }
            return result;
        }

        public DisjointSet Clone()
        {
            var rank = new int[Count];
            _rank.CopyTo(rank, 0);
            var parent = new int[Count];
            _parent.CopyTo(parent, 0);
            return new DisjointSet(Count, parent, rank);
        }

        public override string ToString()
        {
            return string.Join(",", _parent.Take(50));
        }
    }

    public class Matrix
    {
        public static Matrix Create(int i, int j)
        {
            var m = new Matrix(i, j);
            return m;
        }

        public static Matrix Create(int i)
        {
            var m = new Matrix(i, i);
            return m;
        }

        public long Modulo { get; set; }

        private readonly int _width;
        private readonly int _height;
        private readonly long[,] _data;
        public int Width { get { return _width; } }
        public int Height { get { return _height; } }

        private Matrix(int i, int j)
        {
            Modulo = 1000000000000000000L;
            _width = j;
            _height = i;
            _data = new long[_height, _width];
        }

        public static Matrix operator *(Matrix m1, Matrix m2)
        {
            if (m1.Width != m2.Height) throw new InvalidDataException("m1.Width != m2.Height");
            var m = Create(m2.Width, m1.Height);
            m.Modulo = m1.Modulo;
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                {
                    for (var k = 0; k < m1.Width; k++)
                        m[j, i] += (m1[j, k] * m2[k, i]) % m1.Modulo;
                    m[j, i] %= m1.Modulo;
                }
            return m;
        }

        public static Matrix operator +(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] + m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator -(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] - m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator *(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] * l) % m.Modulo;
            return m;
        }

        public static Matrix operator *(long l, Matrix m1)
        {
            return m1 * l;
        }

        public static Matrix operator +(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                m[i, i] = (m[i, i] + l) % m.Modulo;
            return m;
        }

        public static Matrix operator +(long l, Matrix m1)
        {
            return m1 + l;
        }

        public static Matrix operator -(Matrix m1, long l)
        {
            return m1 + (-l);
        }

        public static Matrix operator -(long l, Matrix m1)
        {
            var m = m1.Clone() * -1;
            return m + l;
        }

        public Matrix BinPower(long l)
        {
            var n = 1;
            var m = Clone();
            var result = new Matrix(m.Height, m.Width) + 1;
            result.Modulo = m.Modulo;
            while (l != 0)
            {
                var i = l & ~(l - 1);
                l -= i;
                while (n < i)
                {
                    m = m * m;
                    n <<= 1;
                }
                result *= m;
            }
            return result;
        }

        public void Fill(long l)
        {
            l %= Modulo;
            for (var i = 0; i < _height; i++)
                for (var j = 0; j < _width; j++)
                    _data[i, j] = l;
        }

        public Matrix Clone()
        {
            var m = new Matrix(_width, _height);
            Array.Copy(_data, m._data, _data.Length);
            m.Modulo = Modulo;
            return m;
        }

        public long this[int i, int j]
        {
            get { return _data[i, j]; }
            set { _data[i, j] = value % Modulo; }
        }
    }

    public class RedBlackTree<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTree(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key, TValue value)
        {
            var node = new Node { Key = key, Value = value, Red = true };
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
                node.Value = deleted.Value;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        public TValue this[TKey key]
        {
            get
            {
                var node = _search(key);
                return node == null ? default(TValue) : node.Value;
            }
            set
            {
                var node = _search(key);
                if (node == null) Add(key, value);
                else node.Value = value;
            }
        }

        public bool Check()
        {
            int count;
            return _root == null || _root.Check(out count);
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        [DebuggerDisplay("{ToString()}")]
        private sealed class Node
        {
            public TKey Key;
            public TValue Value;
            public bool Red;

            public Node Parent;
            public Node Left;
            public Node Right;

            public bool Check(out int count)
            {
                count = 0;
                if (Red)
                {
                    if (Left != null && Left.Red) return false;
                    if (Right != null && Right.Red) return false;
                }
                var left = 0;
                var right = 0;
                if (Left != null && !Left.Check(out left)) return false;
                if (Right != null && !Right.Check(out right)) return false;
                count = left + (Red ? 0 : 1);
                if (left != right)
                {
                    ;
                }
                return left == right;
            }

            public override string ToString()
            {
                return ToShortString(2);
            }

            private string ToShortString(int depth = 0)
            {
                return depth == 0
                    ? string.Format("{0}{1}", Red ? "*" : "", Key)
                    : string.Format("({1}<{0}>{2})", ToShortString(), Left == null ? "null" : Left.ToShortString(depth - 1), Right == null ? "null" : Right.ToShortString(depth - 1));
            }
        }

        #endregion

        #region IEnumerable

        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }

    public class RedBlackTreeSimple<TKey>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTreeSimple(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key)
        {
            var node = new Node(key);
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        private sealed class Node
        {
            public Node(TKey key)
            {
                Key = key;
            }

            public TKey Key;
            public bool Red = true;

            public Node Parent;
            public Node Left;
            public Node Right;
        }

        #endregion
    }

    /// <summary>
    /// Fenwick tree for summary on the array
    /// </summary>
    public class FenwickSum
    {
        public readonly int Size;
        private readonly int[] _items;
        public FenwickSum(int size)
        {
            Size = size;
            _items = new int[Size];
        }

        public FenwickSum(IList<int> items)
            : this(items.Count)
        {
            for (var i = 0; i < Size; i++)
                Increase(i, items[i]);
        }

        private int Sum(int r)
        {
            if (r < 0) return 0;
            if (r >= Size) r = Size - 1;
            var result = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
                result += _items[r];
            return result;
        }

        private int Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public int this[int r]
        {
            get { return Sum(r); }
        }

        public int this[int l, int r]
        {
            get { return Sum(l, r); }
        }

        public void Increase(int i, int delta)
        {
            for (; i < Size; i = i | (i + 1))
                _items[i] += delta;
        }
    }

    /// <summary>
    /// Prime numbers
    /// </summary>
    public class Primes
    {
        /// <summary>
        /// Returns prime numbers in O(n)
        /// Returns lowet divisors as well
        /// Memory O(n)
        /// </summary>
        public static void ImprovedSieveOfEratosthenes(int n, out int[] lp, out List<int> pr)
        {
            lp = new int[n];
            pr = new List<int>();
            for (var i = 2; i < n; i++)
            {
                if (lp[i] == 0)
                {
                    lp[i] = i;
                    pr.Add(i);
                }
                foreach (var prJ in pr)
                {
                    var prIj = i * prJ;
                    if (prJ <= lp[i] && prIj <= n - 1)
                    {
                        lp[prIj] = prJ;
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }

        /// <summary>
        /// Returns prime numbers in O(n*n)
        /// </summary>
        public static void SieveOfEratosthenes(int n, out List<int> pr)
        {
            var m = 50000;//(int)(3l*n/(long)Math.Log(n)/2);
            pr = new List<int>();
            var f = new bool[m];
            for (var i = 2; i * i <= n; i++)
                if (!f[i])
                    for (var j = (long)i * i; j < m && j * j < n; j += i)
                        f[j] = true;
            pr.Add(2);
            for (var i = 3; i * i <= n; i += 2)
                if (!f[i])
                    pr.Add(i);
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static int Gcd(int x, int y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static long Gcd(long x, long y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static BigInteger Gcd(BigInteger x, BigInteger y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Returns all divisors of n in O(√n)
        /// </summary>
        public static IEnumerable<long> GetDivisors(long n)
        {
            long r;
            while (true)
            {
                var x = Math.DivRem(n, 2, out r);
                if (r != 0) break;
                n = x;
                yield return 2;
            }
            var i = 3;
            while (i <= Math.Sqrt(n))
            {
                var x = Math.DivRem(n, i, out r);
                if (r == 0)
                {
                    n = x;
                    yield return i;
                }
                else i += 2;
            }
            if (n != 1) yield return n;
        }
    }

    /// <summary>
    /// Graph matching algorithms
    /// </summary>
    public class GraphMatching
    {
        #region Kuhn algorithm

        /// <summary>
        /// Kuhn algorithm for finding maximal matching
        /// in bipartite graph
        /// Vertexes are numerated from zero: 0, 1, 2, ... n-1
        /// Return array of matchings
        /// </summary>
        public static int[] Kuhn(List<int>[] g, int leftSize, int rightSize)
        {
            Debug.Assert(g.Count() == leftSize);

            var matching = new int[leftSize];
            for (var i = 0; i < rightSize; i++)
                matching[i] = -1;
            var used = new bool[leftSize];

            for (var v = 0; v < leftSize; v++)
            {
                Array.Clear(used, 0, leftSize);
                _kuhn_dfs(v, g, matching, used);
            }

            return matching;
        }

        private static bool _kuhn_dfs(int v, List<int>[] g, int[] matching, bool[] used)
        {
            if (used[v]) return false;
            used[v] = true;
            for (var i = 0; i < g[v].Count; i++)
            {
                var to = g[v][i];
                if (matching[to] == -1 || _kuhn_dfs(matching[to], g, matching, used))
                {
                    matching[to] = v;
                    return true;
                }
            }
            return false;
        }

        #endregion
    }
}

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

namespace Codeforces.TaskB
{
    public class Task
    {
        void Solve()
        {
            Input.Next(out long n);
            Input.Next(out long m);

            var ns = n.ToString();
            var ni = new List<int>();
            for (int i = 0; i < ns.Length; i++)
            {
                ni.Add(int.Parse($"{ns[i]}"));
            }

            ni.Sort();
            var numbers = ni.Distinct();
            var min = numbers.First();
            if (min == 0) //0123456789
            {
                var secondMin = numbers.Skip(1).First();
                StringBuilder sb = new StringBuilder();
                sb.Append(secondMin);
                sb.Append('0', ni.Count(i => i == 0));
                sb.Append(secondMin.ToString()[0], ni.Count(i => i == secondMin) - 1);
                sb.Append(string.Join("", ni.Where(i => i != 0 && i != secondMin).OrderBy(i => i)));

                if (sb.ToString() == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else //123456789
            {
                if (string.Join("", ni) == m.ToString())
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }

        public static void Main()
        {
            var task = new Task();
            #if DEBUG
            task.Solve();
            #else
            try
            {
                task.Solve();
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex);
            }
            #endif
        }
    }
}

namespace Codeforces
{
    public class Input
    {
        private static string _line;

        public static bool Next()
        {
            _line = Console.ReadLine();
            return _line != null;
        }

        public static bool Next(out long a)
        {
            var ok = Next();
            a = ok ? long.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out long a, out long b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out long a, out long b, out long c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out long a, out long b, out long c, out long d, out long e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(long.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a)
        {
            var ok = Next();
            a = ok ? int.Parse(_line) : 0;
            return ok;
        }

        public static bool Next(out int a, out int b)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
            }
            else
            {
                a = b = 0;
            }

            return ok;
        }

        public static bool Next(out int a, out int b, out int c)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
            }
            else
            {
                a = b = c = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
            }
            else
            {
                a = b = c = d = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
            }
            else
            {
                a = b = c = d = e = 0;
            }
            return ok;
        }

        public static bool Next(out int a, out int b, out int c, out int d, out int e, out int f)
        {
            var ok = Next();
            if (ok)
            {
                var array = _line.Split(' ').Select(int.Parse).ToArray();
                a = array[0];
                b = array[1];
                c = array[2];
                d = array[3];
                e = array[4];
                f = array[5];
            }
            else
            {
                a = b = c = d = e = f = 0;
            }
            return ok;
        }

        public static IEnumerable<long> ArrayLong()
        {
            return !Next() ? new List<long>() : _line.Split().Select(long.Parse);
        }

        public static IEnumerable<int> ArrayInt()
        {
            return !Next() ? new List<int>() : _line.Split().Select(int.Parse);
        }

        public static bool Next(out string value)
        {
            value = string.Empty;
            if (!Next()) return false;
            value = _line;
            return true;
        }
    }

    public class DisjointSet
    {
        private readonly int[] _parent;
        private readonly int[] _rank;
        public int Count { get; private set; }

        public DisjointSet(int count, int initialize = 0)
        {
            Count = count;
            _parent = new int[Count];
            _rank = new int[Count];
            for (var i = 0; i < initialize; i++) _parent[i] = i;
        }

        private DisjointSet(int count, int[] parent, int[] rank)
        {
            Count = count;
            _parent = parent;
            _rank = rank;
        }

        public void Add(int v)
        {
            _parent[v] = v;
            _rank[v] = 0;
        }

        public int Find_Recursive(int v)
        {
            if (_parent[v] == v) return v;
            return _parent[v] = Find(_parent[v]);
        }

        public int Find(int v)
        {
            if (_parent[v] == v) return v;
            var last = v;
            while (_parent[last] != last) last = _parent[last];
            while (_parent[v] != v)
            {
                var t = _parent[v];
                _parent[v] = last;
                v = t;
            }
            return last;
        }

        public int this[int v]
        {
            get { return Find(v); }
            set { Union(v, value); }
        }

        public void Union(int a, int b)
        {
            a = Find(a);
            b = Find(b);
            if (a == b) return;
            if (_rank[a] < _rank[b])
            {
                var t = _rank[a];
                _rank[a] = _rank[b];
                _rank[b] = t;
            }
            _parent[b] = a;
            if (_rank[a] == _rank[b]) _rank[a]++;
        }

        public int GetSetCount()
        {
            var result = 0;
            for (var i = 0; i < Count; i++)
            {
                if (_parent[i] == i) result++;
            }
            return result;
        }

        public DisjointSet Clone()
        {
            var rank = new int[Count];
            _rank.CopyTo(rank, 0);
            var parent = new int[Count];
            _parent.CopyTo(parent, 0);
            return new DisjointSet(Count, parent, rank);
        }

        public override string ToString()
        {
            return string.Join(",", _parent.Take(50));
        }
    }

    public class Matrix
    {
        public static Matrix Create(int i, int j)
        {
            var m = new Matrix(i, j);
            return m;
        }

        public static Matrix Create(int i)
        {
            var m = new Matrix(i, i);
            return m;
        }

        public long Modulo { get; set; }

        private readonly int _width;
        private readonly int _height;
        private readonly long[,] _data;
        public int Width { get { return _width; } }
        public int Height { get { return _height; } }

        private Matrix(int i, int j)
        {
            Modulo = 1000000000000000000L;
            _width = j;
            _height = i;
            _data = new long[_height, _width];
        }

        public static Matrix operator *(Matrix m1, Matrix m2)
        {
            if (m1.Width != m2.Height) throw new InvalidDataException("m1.Width != m2.Height");
            var m = Create(m2.Width, m1.Height);
            m.Modulo = m1.Modulo;
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                {
                    for (var k = 0; k < m1.Width; k++)
                        m[j, i] += (m1[j, k] * m2[k, i]) % m1.Modulo;
                    m[j, i] %= m1.Modulo;
                }
            return m;
        }

        public static Matrix operator +(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] + m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator -(Matrix m1, Matrix m2)
        {
            var m = m1.Clone();
            for (var i = 0; i < m2.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] - m2[j, i]) % m1.Modulo;
            return m;
        }

        public static Matrix operator *(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                for (var j = 0; j < m1.Height; j++)
                    m[j, i] = (m[j, i] * l) % m.Modulo;
            return m;
        }

        public static Matrix operator *(long l, Matrix m1)
        {
            return m1 * l;
        }

        public static Matrix operator +(Matrix m1, long l)
        {
            var m = m1.Clone();
            for (var i = 0; i < m1.Width; i++)
                m[i, i] = (m[i, i] + l) % m.Modulo;
            return m;
        }

        public static Matrix operator +(long l, Matrix m1)
        {
            return m1 + l;
        }

        public static Matrix operator -(Matrix m1, long l)
        {
            return m1 + (-l);
        }

        public static Matrix operator -(long l, Matrix m1)
        {
            var m = m1.Clone() * -1;
            return m + l;
        }

        public Matrix BinPower(long l)
        {
            var n = 1;
            var m = Clone();
            var result = new Matrix(m.Height, m.Width) + 1;
            result.Modulo = m.Modulo;
            while (l != 0)
            {
                var i = l & ~(l - 1);
                l -= i;
                while (n < i)
                {
                    m = m * m;
                    n <<= 1;
                }
                result *= m;
            }
            return result;
        }

        public void Fill(long l)
        {
            l %= Modulo;
            for (var i = 0; i < _height; i++)
                for (var j = 0; j < _width; j++)
                    _data[i, j] = l;
        }

        public Matrix Clone()
        {
            var m = new Matrix(_width, _height);
            Array.Copy(_data, m._data, _data.Length);
            m.Modulo = Modulo;
            return m;
        }

        public long this[int i, int j]
        {
            get { return _data[i, j]; }
            set { _data[i, j] = value % Modulo; }
        }
    }

    public class RedBlackTree<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTree(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key, TValue value)
        {
            var node = new Node { Key = key, Value = value, Red = true };
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
                node.Value = deleted.Value;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        public TValue this[TKey key]
        {
            get
            {
                var node = _search(key);
                return node == null ? default(TValue) : node.Value;
            }
            set
            {
                var node = _search(key);
                if (node == null) Add(key, value);
                else node.Value = value;
            }
        }

        public bool Check()
        {
            int count;
            return _root == null || _root.Check(out count);
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        [DebuggerDisplay("{ToString()}")]
        private sealed class Node
        {
            public TKey Key;
            public TValue Value;
            public bool Red;

            public Node Parent;
            public Node Left;
            public Node Right;

            public bool Check(out int count)
            {
                count = 0;
                if (Red)
                {
                    if (Left != null && Left.Red) return false;
                    if (Right != null && Right.Red) return false;
                }
                var left = 0;
                var right = 0;
                if (Left != null && !Left.Check(out left)) return false;
                if (Right != null && !Right.Check(out right)) return false;
                count = left + (Red ? 0 : 1);
                if (left != right)
                {
                    ;
                }
                return left == right;
            }

            public override string ToString()
            {
                return ToShortString(2);
            }

            private string ToShortString(int depth = 0)
            {
                return depth == 0
                    ? string.Format("{0}{1}", Red ? "*" : "", Key)
                    : string.Format("({1}<{0}>{2})", ToShortString(), Left == null ? "null" : Left.ToShortString(depth - 1), Right == null ? "null" : Right.ToShortString(depth - 1));
            }
        }

        #endregion

        #region IEnumerable

        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }

    public class RedBlackTreeSimple<TKey>
    {
        private readonly List<Node> _items;
        private Node _root;
        private readonly IComparer<TKey> _comparer;

        public RedBlackTreeSimple(int capacity = 10)
        {
            _items = new List<Node>(capacity);
            _comparer = Comparer<TKey>.Default;
        }

        private Node _search(TKey key)
        {
            var node = _root;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return node;
                node = i > 0 ? node.Right : node.Left;
            }
            return null;
        }

        /// <summary>
        /// Returns lower or equal key
        /// </summary>
        public TKey Lower(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i > 0)
                {
                    good = node;
                    node = node.Right;
                }
                else
                    node = node.Left;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns higher or equal key
        /// </summary>
        public TKey Higher(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node good = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return key;
                if (i < 0)
                {
                    good = node;
                    node = node.Left;
                }
                else
                    node = node.Right;
            }
            return good == null ? notFound : good.Key;
        }

        /// <summary>
        /// Returns minimum region, which encloses given key
        /// </summary>
        public Tuple<TKey, TKey> Bounds(TKey key, TKey notFound = default(TKey))
        {
            var node = _root;
            Node lower = null;
            Node higher = null;
            while (node != null)
            {
                var i = _comparer.Compare(key, node.Key);
                if (i == 0) return new Tuple<TKey, TKey>(key, key);
                if (i < 0)
                {
                    higher = node;
                    node = node.Left;
                }
                else
                {
                    lower = node;
                    node = node.Right;
                }
            }
            return new Tuple<TKey, TKey>(lower == null ? notFound : lower.Key, higher == null ? notFound : higher.Key);
        }

        public void Add(TKey key)
        {
            var node = new Node(key);
            _items.Add(node);
            if (_root == null)
            {
                _root = node;
                _root.Red = false;
                return;
            }
            var x = _root;
            Node y = null;
            while (x != null)
            {
                y = x;
                x = _comparer.Compare(key, x.Key) > 0 ? x.Right : x.Left;
            }
            node.Parent = y;
            if (y == null) _root = node;
            else if (_comparer.Compare(key, y.Key) > 0) y.Right = node;
            else y.Left = node;
            InsertFixup(node);
        }

        private void InsertFixup(Node node)
        {
            while (true)
            {
                var parent = node.Parent;
                if (parent == null || !parent.Red || parent.Parent == null) break;
                var grand = parent.Parent;

                if (parent == grand.Left)
                {
                    var uncle = grand.Right;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Right) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateLeft(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateRight(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
                else
                {
                    if (_root.Parent != null) Debugger.Break();

                    var uncle = grand.Left;
                    if (uncle != null && uncle.Red) /* parent and uncle both red: we could swap colors of them with grand */
                    {
                        parent.Red = false;
                        uncle.Red = false;
                        grand.Red = true;
                        node = grand; /* and continue fixing tree for grand */
                    }
                    else if (node == parent.Left) /* we rotate around the parent */
                    {
                        node = parent;
                        RotateRight(node);
                    }
                    else /* rotate around grand and switch colors of grand and parent */
                    {
                        parent.Red = false;
                        grand.Red = true;
                        RotateLeft(grand);
                        if (grand == _root) _root = parent;
                        break; /* and finish since tree is fixed */
                    }
                }
            }
            _root.Red = false;
        }

        private void RotateLeft(Node node)
        {
            if (node.Right == null)
                throw new NotSupportedException("Cannot rotate left: right node is missing");
            var parent = node.Parent;
            var right = node.Right;
            right.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = right;
                else parent.Right = right;
            }
            node.Right = right.Left;
            if (node.Right != null)
                node.Right.Parent = node;
            right.Left = node;
            node.Parent = right;
        }

        private void RotateRight(Node node)
        {
            if (node.Left == null)
                throw new NotSupportedException("Cannot rotate right: left node is missing");
            var parent = node.Parent;
            var left = node.Left;
            left.Parent = parent;
            if (parent != null)
            {
                if (parent.Left == node) parent.Left = left;
                else parent.Right = left;
            }
            node.Left = left.Right;
            if (node.Left != null)
                node.Left.Parent = node;
            left.Right = node;
            node.Parent = left;
        }

        public void Remove(TKey key)
        {
            var node = _search(key);
            if (node == null) return;

            var deleted = node.Left == null || node.Right == null ? node : Next(node);
            var child = deleted.Left ?? deleted.Right;
            if (child != null)
                child.Parent = deleted.Parent;
            if (deleted.Parent == null) /* root */
                _root = child;
            else if (deleted == deleted.Parent.Left)
                deleted.Parent.Left = child;
            else
                deleted.Parent.Right = child;
            if (node != deleted)
            {
                node.Key = deleted.Key;
            }

            if (!deleted.Red)
            {
                DeleteFixup(child, deleted.Parent);
            }
        }

        private void DeleteFixup(Node node, Node parent)
        {
            while (parent != null && (node == null || !node.Red))
            {
                if (node == parent.Left)
                {
                    var brother = parent.Right;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateLeft(parent);
                        brother = parent.Right;
                    }
                    if ((brother.Left == null || !brother.Left.Red) && (brother.Right == null || !brother.Right.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Right == null || !brother.Right.Red)
                        {
                            if (brother.Left != null)
                                brother.Left.Red = false;
                            brother.Red = true;
                            RotateRight(brother);
                            brother = parent.Right;
                        }
                        if (!brother.Right.Red) Debugger.Break();
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Right != null)
                            brother.Right.Red = false;
                        RotateLeft(parent);
                        node = _root;
                    }
                }
                else
                {
                    var brother = parent.Left;
                    if (brother.Red)
                    {
                        brother.Red = false;
                        parent.Red = true;
                        RotateRight(parent);
                        brother = parent.Left;
                    }
                    if ((brother.Right == null || !brother.Right.Red) && (brother.Left == null || !brother.Left.Red))
                    {
                        node = parent.Red ? _root : parent;
                        brother.Red = true;
                        parent.Red = false;
                    }
                    else
                    {
                        if (brother.Left == null || !brother.Left.Red)
                        {
                            if (brother.Right != null)
                                brother.Right.Red = false;
                            brother.Red = true;
                            RotateLeft(brother);
                            brother = parent.Left;
                        }
                        brother.Red = parent.Red;
                        parent.Red = false;
                        if (brother.Left != null)
                            brother.Left.Red = false;
                        RotateRight(parent);
                        node = _root;
                    }
                }
                parent = node.Parent;
            }

            node.Red = false;
        }

        private Node Minimum(Node node)
        {
            var result = node;
            while (result.Left != null) result = result.Left;
            return result;
        }

        private Node Maximum(Node node)
        {
            var result = node;
            while (result.Right != null) result = result.Right;
            return result;
        }

        private Node Next(Node node)
        {
            Node result;
            if (node.Right != null)
            {
                result = Minimum(node.Right);
            }
            else
            {
                while (node.Parent != null && node.Parent.Right == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        private Node Previous(Node node)
        {
            Node result;
            if (node.Left != null)
            {
                result = Maximum(node.Left);
            }
            else
            {
                while (node.Parent != null && node.Parent.Left == node)
                    node = node.Parent;
                result = node.Parent;
            }
            return result;
        }

        public void Print()
        {
            var node = Minimum(_root);
            while (node != null)
            {
                Console.Write(node.Red ? '*' : ' ');
                Console.Write(node.Key);
                Console.Write('\t');
                node = Next(node);
            }
        }

        #region Nested classes

        private sealed class Node
        {
            public Node(TKey key)
            {
                Key = key;
            }

            public TKey Key;
            public bool Red = true;

            public Node Parent;
            public Node Left;
            public Node Right;
        }

        #endregion
    }

    /// <summary>
    /// Fenwick tree for summary on the array
    /// </summary>
    public class FenwickSum
    {
        public readonly int Size;
        private readonly int[] _items;
        public FenwickSum(int size)
        {
            Size = size;
            _items = new int[Size];
        }

        public FenwickSum(IList<int> items)
            : this(items.Count)
        {
            for (var i = 0; i < Size; i++)
                Increase(i, items[i]);
        }

        private int Sum(int r)
        {
            if (r < 0) return 0;
            if (r >= Size) r = Size - 1;
            var result = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1)
                result += _items[r];
            return result;
        }

        private int Sum(int l, int r)
        {
            return Sum(r) - Sum(l - 1);
        }

        public int this[int r]
        {
            get { return Sum(r); }
        }

        public int this[int l, int r]
        {
            get { return Sum(l, r); }
        }

        public void Increase(int i, int delta)
        {
            for (; i < Size; i = i | (i + 1))
                _items[i] += delta;
        }
    }

    /// <summary>
    /// Prime numbers
    /// </summary>
    public class Primes
    {
        /// <summary>
        /// Returns prime numbers in O(n)
        /// Returns lowet divisors as well
        /// Memory O(n)
        /// </summary>
        public static void ImprovedSieveOfEratosthenes(int n, out int[] lp, out List<int> pr)
        {
            lp = new int[n];
            pr = new List<int>();
            for (var i = 2; i < n; i++)
            {
                if (lp[i] == 0)
                {
                    lp[i] = i;
                    pr.Add(i);
                }
                foreach (var prJ in pr)
                {
                    var prIj = i * prJ;
                    if (prJ <= lp[i] && prIj <= n - 1)
                    {
                        lp[prIj] = prJ;
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }

        /// <summary>
        /// Returns prime numbers in O(n*n)
        /// </summary>
        public static void SieveOfEratosthenes(int n, out List<int> pr)
        {
            var m = 50000;//(int)(3l*n/(long)Math.Log(n)/2);
            pr = new List<int>();
            var f = new bool[m];
            for (var i = 2; i * i <= n; i++)
                if (!f[i])
                    for (var j = (long)i * i; j < m && j * j < n; j += i)
                        f[j] = true;
            pr.Add(2);
            for (var i = 3; i * i <= n; i += 2)
                if (!f[i])
                    pr.Add(i);
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static int Gcd(int x, int y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static long Gcd(long x, long y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Greatest common divisor
        /// </summary>
        public static BigInteger Gcd(BigInteger x, BigInteger y)
        {
            while (y != 0)
            {
                var c = y;
                y = x % y;
                x = c;
            }
            return x;
        }

        /// <summary>
        /// Returns all divisors of n in O(√n)
        /// </summary>
        public static IEnumerable<long> GetDivisors(long n)
        {
            long r;
            while (true)
            {
                var x = Math.DivRem(n, 2, out r);
                if (r != 0) break;
                n = x;
                yield return 2;
            }
            var i = 3;
            while (i <= Math.Sqrt(n))
            {
                var x = Math.DivRem(n, i, out r);
                if (r == 0)
                {
                    n = x;
                    yield return i;
                }
                else i += 2;
            }
            if (n != 1) yield return n;
        }
    }

    /// <summary>
    /// Graph matching algorithms
    /// </summary>
    public class GraphMatching
    {
        #region Kuhn algorithm

        /// <summary>
        /// Kuhn algorithm for finding maximal matching
        /// in bipartite graph
        /// Vertexes are numerated from zero: 0, 1, 2, ... n-1
        /// Return array of matchings
        /// </summary>
        public static int[] Kuhn(List<int>[] g, int leftSize, int rightSize)
        {
            Debug.Assert(g.Count() == leftSize);

            var matching = new int[leftSize];
            for (var i = 0; i < rightSize; i++)
                matching[i] = -1;
            var used = new bool[leftSize];

            for (var v = 0; v < leftSize; v++)
            {
                Array.Clear(used, 0, leftSize);
                _kuhn_dfs(v, g, matching, used);
            }

            return matching;
        }

        private static bool _kuhn_dfs(int v, List<int>[] g, int[] matching, bool[] used)
        {
            if (used[v]) return false;
            used[v] = true;
            for (var i = 0; i < g[v].Count; i++)
            {
                var to = g[v][i];
                if (matching[to] == -1 || _kuhn_dfs(matching[to], g, matching, used))
                {
                    matching[to] = v;
                    return true;
                }
            }
            return false;
        }

        #endregion
    }
}

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

namespace N1
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] arr;
            string s = null;

            string[] numbers=new string[2];

            numbers[0] = Console.ReadLine();
            numbers[1] = Console.ReadLine();

            arr = numbers[0].ToArray();
            Array.Sort(arr);

            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] != '0')
                {
                    char temp = arr[0];
                    arr[0] = arr[i];
                    arr[i] = temp;
                    break;
                }
            }

            foreach (char x in arr)
                s += x;

            if (int.Parse(s) == int.Parse(numbers[1]))
                Console.WriteLine("OK");
            else Console.WriteLine("WRONG_ANSWER");

            Console.ReadLine();

        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();

            string b = Console.ReadLine();

            char[] array = a.ToCharArray();
            Array.Sort(array);
            string c = "";
            string nulls = "";
            foreach (var item in array)
            {
                if (item == '0')
                    nulls += item;
                else
                    c += item;
            }
            c = c.Insert(1, nulls);

            Console.WriteLine(c);

            if (b == c)
                Console.WriteLine("OK");
            else
                Console.WriteLine("WRONG_ANSWER");

            Console.ReadLine();
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Введите первое число:");
            string a = Console.ReadLine();

            Console.WriteLine("Введите второе число:");
            string b = Console.ReadLine();

            char[] array = a.ToCharArray();
            Array.Sort(array);
            string c = "";
            string nulls = "";
            foreach (var item in array)
            {
                if (item == '0')
                    nulls += item;
                else
                    c += item;
            }
            c = c.Insert(1, nulls);

         //   Console.WriteLine(c);

            if (b == c)
                Console.WriteLine("OK");
            else
                Console.WriteLine("WRONG_ANSWER");

            Console.ReadLine();
        }
    }
}

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

namespace tmp
{
    class Program
    {
        static void Main(string[] args)
        {
            int big = Convert.ToInt32(Console.ReadLine());
            int small = Convert.ToInt32(Console.ReadLine());
            if (big == 0 && small == 0) { Console.Write("OK"); goto end; }
            if (big == 0 || small == 0) { Console.Write("WRONG_ANSWER"); goto end; }
            string a = big.ToString();
            char[] b = a.ToCharArray();
            Array.Sort(b);
            int zero = 0;
            int num = 1;
            int index = 0;
            while (index < b.Length && b[index] == '0')
            {
                zero++;
                index++;
            }
            if (zero == 0) num = 0;
            else num = (b[index++] - '0') * (int)Math.Pow(10, zero);
            while (index < b.Length)
                num = 10 * num + b[index++] - '0';
            if (num == small) Console.Write("OK");
            else Console.Write("WRONG_ANSWER");
            end:
            Console.ReadKey();
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine(((s1 == res && f) || (int.Parse(s) == 0 && int.Parse(s1) == 0)) ? "OK" : "WRONG_ANSWER");
            Console.ReadLine();
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res && f) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res && !f) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            int count = 0;
            for (int i = 0; i < s1.Length; i++)
            {
                if (int.Parse(s1[i].ToString()) != 0)
                    break;
                else
                    count++;
            }

            Console.WriteLine((s1 == res && f || count > 1) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            string str = "";
            bool flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (!flag)
                {
                    if (num[i] == 0)
                        str += "0";
                    else
                    {
                        flag = true;
                    }
                }
            }
            string res = "";
            flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += str;
                    flag = true;
                }
                else if( num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res) ? "OK" : "WRONG");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

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

            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }

            Array.Sort(num);
            bool flag = false;
            if (num.Length != 1)
            {
                for (int i = 0; i < num.Length; i++)
                {
                    if (num[i] == 0)
                        flag = true;
                    else if (num[i] != 0 && flag)
                    {
                        num[0] = num[i];
                        num[i] = 0;
                        flag = false;
                    }
                    else
                        break;
                }
            }
            string res = "";
            for (int i = 0; i < num.Length; i++)
                res += num[i].ToString();
            Console.WriteLine(((s1 == res) || (int.Parse(s) == 0 && int.Parse(s1) == 0)) ? "OK" : "WRONG_ANSWER");
            Console.ReadLine();
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            bool flag = false;
            if (num.Length != 1 && num[0] == 0)
            {
                for (int i = 0; i < num.Length; i++)
                {
                    if (num[i] == 0)
                        flag = true;
                    else if (num[i] != 0 && flag)
                    {
                        num[0] = num[i];
                        num[i] = 0;
                        flag = false;
                    }
                    else
                        break;
                }
            }
            string res = "";
            for (int i = 0; i < num.Length; i++)
                res += num[i].ToString();
            Console.WriteLine(((s1 == res) || (int.Parse(s) == 0 && int.Parse(s1) == 0)) && !flag ? "OK" : "WRONG_ANSWER");
            Console.ReadLine();
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            string str = "";
            bool flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                    if (num[i] == 0)
                        str += "0";
                    else
                        break;
            }
            string res = "";
            flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            string str = "";
            bool flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (!flag)
                {
                    if (num[i] == 0)
                        str += "0";
                    else
                    {
                        flag = true;
                    }
                }
            }
            string res = "";
            flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res) ? "OK" : "WRONG");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            Array.Sort(num);
            string str = "";
            for (int i = 0; i < num.Length; i++)
            {
                    if (num[i] == 0)
                        str += "0";
            }
            string res = "";
            bool flag = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            int count = 0;
            for (int i = 0; i < s1.Length; i++)
            {
                if (int.Parse(s1[i].ToString()) != 0)
                    break;
                else
                    count++;
            }

            Console.WriteLine((s1 == res && f) ? "OK" : "WRONG_ANSWER");
        }
    }
}

using System;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            int[] num = new int[s.Length];
            for (int i = 0; i < s.Length; i++)
            {
                num[i] = int.Parse(s[i].ToString());
            }
            string str = "";
            bool f = false;
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] == 0)
                    str += "0";
                else
                    f = true;
            }
            string res = "";
            bool flag = false;
            Array.Sort(num);
            for (int i = 0; i < num.Length; i++)
            {
                if (num[i] != 0 && !flag)
                {
                    res += num[i];
                    res += str;
                    flag = true;
                }
                else if(num[i] != 0)
                    res += num[i];
            }
            Console.WriteLine((s1 == res && f || (int.Parse(s) == 0 && int.Parse(s1) == 0)) ? "OK" : "WRONG_ANSWER");
            Console.ReadLine();
        }
    }
}

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

namespace task12B
{
    class Program
    {
        public static string GetOptimal(string number)
        {
            Int32 countNulls = 0;
            for (Int32 i = 0; i < number.Length; i++)
            {
                if (number[i] == '0')
                {
                    countNulls++;
                }
            }
            number = number.Replace("0", "");
            Int32[] arr = new int[number.Length];
            for (Int32 i = 0; i < number.Length; i++)
            {
                arr[i] = number[i]-48;
            }
            for (Int32 i = 0; i < arr.Length; i++)
            {
                for (Int32 j = i + 1; j < arr.Length; j++)
                {
                    if (arr[i] >= arr[j])
                    {
                        Int32 t = arr[i];
                        arr[i] = arr[j];
                        arr[j] = t;
                    }
                }
            }
            string result = "";
            result = arr[0].ToString();
            for (Int32 i = 0; i < countNulls; i++)
            {
                result += "0";
            }
            for (Int32 i = 1; i < arr.Length; i++)
            {
                result += arr[i].ToString();
            }
            return result;
        }
        static void Main(string[] args)
        {
            string number = Console.ReadLine();
            string answer = Console.ReadLine();
            if (number == "0")
            {
                if (answer.Replace("0", "") == "")
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else
            {
                if (GetOptimal(number) == answer)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            //Console.ReadLine();
            //string answer = Console.ReadLine();
            //
        }
    }
}

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

namespace task12B
{
    class Program
    {
        public static string DeleteFirstsNulls(string number)
        {
            string result = string.Empty;
            Int32 i = 0;
            while (i<number.Length && number[i] == '0')
            {
                i++;
            }
            for (Int32 j = i; j < number.Length; j++)
            {
                result += number[j];
            }
            return result;
        }
        public static string GetOptimal(string number)
        {
            Int32 countNulls = 0;
            for (Int32 i = 0; i < number.Length; i++)
            {
                if (number[i] == '0')
                {
                    countNulls++;
                }
            }
            number = number.Replace("0", "");
            Int32[] arr = new int[number.Length];
            for (Int32 i = 0; i < number.Length; i++)
            {
                arr[i] = number[i]-48;
            }
            for (Int32 i = 0; i < arr.Length; i++)
            {
                for (Int32 j = i + 1; j < arr.Length; j++)
                {
                    if (arr[i] >= arr[j])
                    {
                        Int32 t = arr[i];
                        arr[i] = arr[j];
                        arr[j] = t;
                    }
                }
            }
            string result = "";
            result = arr[0].ToString();
            for (Int32 i = 0; i < countNulls; i++)
            {
                result += "0";
            }
            for (Int32 i = 1; i < arr.Length; i++)
            {
                result += arr[i].ToString();
            }
            return result;
        }
        static void Main(string[] args)
        {
            string number = Console.ReadLine();
            string answer = Console.ReadLine();
            //Console.WriteLine(DeleteFirstsNulls(number));
            if (number == "0")
            {
                if (answer == "0")
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            else
            {
                if (GetOptimal(number) == DeleteFirstsNulls(answer))
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
            //Console.ReadLine();
            //string answer = Console.ReadLine();
            //
        }
    }
}

using System;
using System.IO;
using System.Collections;

class Program
{
  class Pair : System.IComparable
  {
    public int x;
    public int y;

    public Pair (int xx, int yy)
    {
      x = xx;
      y = yy;
    }

    public int CompareTo(object obj)
    {
      Pair p = (Pair) obj;
      return x < p.x ? -1 : x == p.x ? 0 : 1;
    }
  }

  static void Main(string[] args)
  {
    //Console.SetIn(File.OpenText("../../input.txt"));
    int [] a = new int[10];

    string n = Console.ReadLine();
    for (int i = 0; i < n.Length; ++i)
      ++a[n[i] - '0'];

    string m = Console.ReadLine();

    string s = "";
    bool f = true;
    bool find = true;
    while (find)
    {
      find = false;
      for (int i = f ? 1 : 0; i < 10; ++i)
        if (a[i] > 0)
        {
          a[i]--;
          s += i;
          find = true;
          break;
        }
      f = false;
    }

    Console.WriteLine(m.Equals(s) ? "OK" : "WRONG_ANSWER");

    /*
    string str = "";
    while (!string.IsNullOrEmpty((str = Console.ReadLine())))

    var dict = new System.Collections.Generic.Dictionary<string, int>();

    Pair[] a = new Pair[100];
    for (int i = 0; i < a.Length; ++i)
      a[i] = new Pair(100 - i, i);
    Array.Sort(a);

    int testCount = Convert.ToInt32(Console.ReadLine());
    int n = int.Parse(Console.ReadLine());
    string[] data = Console.ReadLine().Split(new char[] { ' ' });
    */

    Console.ReadKey();
  }
}

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

namespace Contest_12
{
    class Program
    {
        static void B()
        {
            var s = Console.ReadLine();
            string r1 = Console.ReadLine();
            string r2 = "";
            int[] a = new int[10];

            for (int i = 0; i < s.Length; i++)
            {
                a[int.Parse(s[i].ToString())]++;
            }

            for (int i = 1; i < 10; i++)
            {
                if (a[i] > 0)
                {
                    r2 += i;
                    a[i]--;
                    break;
                }
            }

            for (int i = 0; i < 10; i++)
            {
                while (a[i] > 0)
                {
                    r2 += i;
                    a[i]--;
                }
            }

            Console.WriteLine(r1 == r2 ? "OK" : "NO");
        }

        static void Main(string[] args)
        {
            B();
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] cs = Console.ReadLine().ToCharArray();
            Array.Sort(cs);
            for (int i = 0; i < cs.Length; ++i)
                if (cs[i] != '0')
                {
                    char tmp = cs[0];
                    cs[0] = cs[i];
                    cs[i] = tmp;
                    break;
                }
            for (int i = 0; i < cs.Length; ++i)
                if (Console.Read() != cs[i])
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            if (Console.KeyAvailable) Console.Write("WRONG_ANSWER");
            else Console.Write("OK");
        }
    }
}

/*           Array.Sort(cs);
for (int i = 0; i < cs.Length; ++i)
    if (cs[i] != '0')
    {
        char tmp = cs[0];
        cs[0] = cs[i];
        cs[i] = tmp;
        break;
    }
Console.WriteLine(cs);
for(int i=0;i<cs.Length;++i)
    if (Console.Read() != cs[i])
    {
        Console.Write("WRONG_ANSWER");
        return;
    }
Console.Write("OK");*/
/*
            string[] names = Console.ReadLine().Split(' ');
            int[] count = { int.Parse(names[0]), int.Parse(names[1]) };
            int[] much = new int[count[0]];
            int i=0;
            foreach (string s in Console.ReadLine().Split(' '))
                much[i++] = int.Parse(s);
            names = new string[count[1]];
            for (i = 0; i < count[1]; ++i)
                names[i] = Console.ReadLine();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            foreach (string s in names)
            {
                if (dic.ContainsKey(s)) ++dic[s];
                else dic.Add(s, 1);
            }

            List<KeyValuePair<string, int>> tmp = new List<KeyValuePair<string, int>>(dic.Count);
            foreach (KeyValuePair<string, int> item in dic)
                tmp.Add(item);
            tmp.Sort((x, y) => { return x.Value.CompareTo(y.Value); });
            tmp.Reverse();

            Array.Sort(much);

            int v=0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString() + " ");

            Array.Reverse(much);
            v = 0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString());*/
/*            int count = int.Parse(Console.ReadLine());
            List<int[]> vb = new List<int[]>(count);
            string[] sb = Console.ReadLine().Split(' ');
            string[] si = Console.ReadLine().Split(' ');
            string[] sr = Console.ReadLine().Split(' ');
            for(int i=0;i<count;++i)
                vb.Add(new int[] { int.Parse(sb[i]), int.Parse(si[i]), int.Parse(sr[i]) });

            uint c = 0;
            for (int i = 0; i < count; ++i)
            {
                int[] a = vb[i];
                for (int ii = 0; ii < count; ++ii)
                {
                    int[] b = vb[ii];
                    if (a[0] < b[0] && a[1] < b[1] && a[2] < b[2])
                    {
                        ++c;
                        vb.RemoveAt(i--);
                        --count;
                        break;
                    }
                }
            }
            Console.Write(c);*/

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            char[] cs = s.ToCharArray();
            Array.Sort(cs, (x,y)=>{return int.Parse(x.ToString()).CompareTo(int.Parse(y.ToString()));});
            for (int i = 0; i < cs.Length; ++i)
                if (cs[i] != '0')
                {
                    char tmp = cs[0];
                    cs[0] = cs[i];
                    cs[i] = tmp;
                    break;
                }
            foreach (char c in cs)
                if (Console.Read() != c)
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");
        }
    }
}

            /* string s=Console.ReadLine();
			char[] cs=s.ToCharArray();
            Array.Sort(cs);
            for(int i=0;i<cs.Length;++i)
                if(cs[i]!='0'){
                    char tmp=cs[0];
                    cs[0]=cs[i];
                    cs[i]=tmp;
                    break;
                }
            foreach (char c in cs)
                Console.Write(c);
               if (Console.Read() != c)
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");*/
/*
            string[] names = Console.ReadLine().Split(' ');
            int[] count = { int.Parse(names[0]), int.Parse(names[1]) };
            int[] much = new int[count[0]];
            int i=0;
            foreach (string s in Console.ReadLine().Split(' '))
                much[i++] = int.Parse(s);
            names = new string[count[1]];
            for (i = 0; i < count[1]; ++i)
                names[i] = Console.ReadLine();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            foreach (string s in names)
            {
                if (dic.ContainsKey(s)) ++dic[s];
                else dic.Add(s, 1);
            }

            List<KeyValuePair<string, int>> tmp = new List<KeyValuePair<string, int>>(dic.Count);
            foreach (KeyValuePair<string, int> item in dic)
                tmp.Add(item);
            tmp.Sort((x, y) => { return x.Value.CompareTo(y.Value); });
            tmp.Reverse();

            Array.Sort(much);

            int v=0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString() + " ");

            Array.Reverse(much);
            v = 0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString());*/
/*            uint count = uint.Parse(Console.ReadLine());
            uint[] vb = new uint[count];
            uint[] vi = new uint[count];
            uint[] vr = new uint[count];
            uint[] max = new uint[3];
            uint[][] tmp={vb,vi,vr};
            int si = 0;
            foreach(uint[] a in tmp)
            {
                uint i = 0;
                foreach (string s in Console.ReadLine().Split(' '))
                {
                    a[i] = uint.Parse(s);
                    if (max[si] < a[i]) max[si] = a[i];
                    ++i;
                }
                ++si;
            }

            uint c = 0;
            for (int i = 0; i < count; ++i)
                if (vb[i] < max[0] && vi[i] < max[1] && vr[i] < max[2])
                    ++c;
            Console.Write(c);*/

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s=Console.ReadLine();
			char[] cs=s.ToCharArray();
            Array.Sort(cs);
            for(int i=0;i<cs.Length;++i)
                if(cs[i]!='0'){
                    char tmp=cs[0];
                    cs[0]=cs[i];
                    cs[i]=tmp;
                    break;
                }
            foreach(char c in cs)
                if (Console.Read() != c)
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");
        }
    }
}

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] cs = Console.ReadLine().ToCharArray();
            Array.Sort(cs);
            for (int i = 0; i < cs.Length; ++i)
                if (int.Parse(cs[i].ToString()) != 0)
                {
                    char tmp = cs[0];
                    cs[0] = cs[i];
                    cs[i] = tmp;
                    break;
                }
            for(int i=0;i<cs.Length;++i)
                if (Console.Read() != cs[i])
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");
        }
    }
}

            /* string s=Console.ReadLine();
			char[] cs=s.ToCharArray();
            Array.Sort(cs);
            for(int i=0;i<cs.Length;++i)
                if(cs[i]!='0'){
                    char tmp=cs[0];
                    cs[0]=cs[i];
                    cs[i]=tmp;
                    break;
                }
            foreach (char c in cs)
                Console.Write(c);
               if (Console.Read() != c)
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");*/
/*
            string[] names = Console.ReadLine().Split(' ');
            int[] count = { int.Parse(names[0]), int.Parse(names[1]) };
            int[] much = new int[count[0]];
            int i=0;
            foreach (string s in Console.ReadLine().Split(' '))
                much[i++] = int.Parse(s);
            names = new string[count[1]];
            for (i = 0; i < count[1]; ++i)
                names[i] = Console.ReadLine();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            foreach (string s in names)
            {
                if (dic.ContainsKey(s)) ++dic[s];
                else dic.Add(s, 1);
            }

            List<KeyValuePair<string, int>> tmp = new List<KeyValuePair<string, int>>(dic.Count);
            foreach (KeyValuePair<string, int> item in dic)
                tmp.Add(item);
            tmp.Sort((x, y) => { return x.Value.CompareTo(y.Value); });
            tmp.Reverse();

            Array.Sort(much);

            int v=0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString() + " ");

            Array.Reverse(much);
            v = 0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString());*/
/*            uint count = uint.Parse(Console.ReadLine());
            uint[] vb = new uint[count];
            uint[] vi = new uint[count];
            uint[] vr = new uint[count];
            uint[] max = new uint[3];
            uint[][] tmp={vb,vi,vr};
            int si = 0;
            foreach(uint[] a in tmp)
            {
                uint i = 0;
                foreach (string s in Console.ReadLine().Split(' '))
                {
                    a[i] = uint.Parse(s);
                    if (max[si] < a[i]) max[si] = a[i];
                    ++i;
                }
                ++si;
            }

            uint c = 0;
            for (int i = 0; i < count; ++i)
                if (vb[i] < max[0] && vi[i] < max[1] && vr[i] < max[2])
                    ++c;
            Console.Write(c);*/

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            char[] cs = s.ToCharArray();
            Array.Sort(cs);
            for (int i = 0; i < cs.Length; ++i)
                if (cs[i] != '0')
                {
                    char tmp = cs[0];
                    cs[0] = cs[i];
                    cs[i] = tmp;
                    break;
                }
            for(int i=0;i<cs.Length;++i)
                if (Console.Read() != cs[i])
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");
        }
    }
}

            /* string s=Console.ReadLine();
			char[] cs=s.ToCharArray();
            Array.Sort(cs);
            for(int i=0;i<cs.Length;++i)
                if(cs[i]!='0'){
                    char tmp=cs[0];
                    cs[0]=cs[i];
                    cs[i]=tmp;
                    break;
                }
            foreach (char c in cs)
                Console.Write(c);
               if (Console.Read() != c)
                {
                    Console.Write("WRONG_ANSWER");
                    return;
                }
            Console.Write("OK");*/
/*
            string[] names = Console.ReadLine().Split(' ');
            int[] count = { int.Parse(names[0]), int.Parse(names[1]) };
            int[] much = new int[count[0]];
            int i=0;
            foreach (string s in Console.ReadLine().Split(' '))
                much[i++] = int.Parse(s);
            names = new string[count[1]];
            for (i = 0; i < count[1]; ++i)
                names[i] = Console.ReadLine();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            foreach (string s in names)
            {
                if (dic.ContainsKey(s)) ++dic[s];
                else dic.Add(s, 1);
            }

            List<KeyValuePair<string, int>> tmp = new List<KeyValuePair<string, int>>(dic.Count);
            foreach (KeyValuePair<string, int> item in dic)
                tmp.Add(item);
            tmp.Sort((x, y) => { return x.Value.CompareTo(y.Value); });
            tmp.Reverse();

            Array.Sort(much);

            int v=0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString() + " ");

            Array.Reverse(much);
            v = 0;
            for (i = 0; i < tmp.Count; ++i)
                v += much[i] * tmp[i].Value;
            Console.Write(v.ToString());*/
/*            uint count = uint.Parse(Console.ReadLine());
            uint[] vb = new uint[count];
            uint[] vi = new uint[count];
            uint[] vr = new uint[count];
            uint[] max = new uint[3];
            uint[][] tmp={vb,vi,vr};
            int si = 0;
            foreach(uint[] a in tmp)
            {
                uint i = 0;
                foreach (string s in Console.ReadLine().Split(' '))
                {
                    a[i] = uint.Parse(s);
                    if (max[si] < a[i]) max[si] = a[i];
                    ++i;
                }
                ++si;
            }

            uint c = 0;
            for (int i = 0; i < count; ++i)
                if (vb[i] < max[0] && vi[i] < max[1] && vr[i] < max[2])
                    ++c;
            Console.Write(c);*/

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

namespace b
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            char[] given = a.ToString().ToCharArray();
            a = int.Parse(Console.ReadLine());
            char[] result = a.ToString().ToCharArray();
            if (result.Length != given.Length)
            {
                Console.WriteLine("WRONG_ANSWER");
            }
            else
            {
                Array.Sort(given);
                int index = 0;
                while (index < given.Length && given[index] == '0')
                {
                    index++;
                }
                if (index < given.Length && index!=0)
                {
                    given[index] ^= given[0];
                    given[0] ^= given[index];
                    given[index] ^= given[0];
                }
                bool ok = true; ;
                for (int i = 0; i < given.Length; i++)
                {
                    if (given[i] != result[i])
                    {
                        ok = false;
                        break;
                    }
                }
                if (ok)
                {
                    Console.WriteLine("OK");
                }
                else
                {
                    Console.WriteLine("WRONG_ANSWER");
                }
            }
        }
    }
}