#include <bits/stdc++.h>
const long long int mod = 1000000007;
const int INF = 1000000000;
using namespace std;
unsigned long long int pow2(unsigned long long int s) {
  if (s != 0 && (s & (s - 1)))
    cout << "0";
  else
    cout << "1";
}
unsigned long long int powany(long long int a, long long int b) {
  unsigned long long int res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
unsigned long long int prime(unsigned long long int n) {
  if (n == 2 || n == 3) return 1;
  if (n % 2 == 0 || n % 3 == 0) return 0;
  for (unsigned long long int i = 7; i * i < n; i += 6)
    if (n % (i) == 0 || n % (i - 2) == 0) return 0;
  return 1;
}
int main() {
  string s, d;
  cin >> s;
  cin >> d;
  unsigned long long int l1 = s.size();
  unsigned long long int l2 = d.size();
  int t = 0;
  if (l1 != l2) {
    cout << "WRONG_ANSWER";
    return 0;
  }
  if (s[0] - 48 == 0 && d[0] - 48 == 0) {
    cout << "OK";
    return 0;
  }
  unsigned long long int a1[10] = {0}, a2[10] = {0}, k = 0;
  for (unsigned long long int i = 0; s[i]; ++i) {
    a1[s[i] - 48]++;
    a2[d[i] - 48]++;
  }
  for (unsigned long long int i = 0; i < 10; ++i) {
    if (a1[i] != a2[i]) {
      cout << "WRONG_ANSWER";
      return 0;
    }
  }
  if (a1[0] == 0) {
    for (unsigned long long int i = 1; i < 10; ++i) {
      for (unsigned long long int j = 0; j < a1[i]; ++j) {
        if ((d[k] - 48) != i) {
          cout << "WRONG_ANSWER";
          return 0;
        }
        k++;
      }
    }
    if (k == l1) cout << "OK";
  } else {
    k = 0;
    for (int p = 1; p < 10; ++p) {
      if (a1[p] != 0) {
        t = p;
        a1[p]--;
        break;
      }
    }
    if (d[k++] - 48 == t) {
      for (unsigned long long int i = 0; i < 10; ++i) {
        for (unsigned long long int j = 0; j < a1[i]; ++j) {
          if (d[k] - 48 != i) {
            cout << "WRONG_ANSWER";
            return 0;
          }
          k++;
        }
      }
      if (k == l1) cout << "OK";
    } else {
      cout << "WRONG_ANSWER";
      return 0;
    }
  }
  return 0;
}
