#include <bits/stdc++.h>
using namespace std;
int cnt0[10];
int cnt1[10];
string check(string s) {
  sort(s.begin(), s.end());
  string ans;
  char hld;
  int counter = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '0') {
      hld = s[i];
      counter++;
      break;
    }
  }
  string special = "ABC";
  if (counter == 0) {
    return special;
  }
  ans += hld;
  int cnt0 = 0;
  int cnthld = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      cnt0++;
    }
    if (s[i] == hld) {
      cnthld++;
    }
  }
  for (int i = 0; i < cnt0; i++) {
    ans += '0';
  }
  for (int i = 0; i < cnthld - 1; i++) {
    ans += hld;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '0' && s[i] != hld) {
      ans += s[i];
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s, x;
  cin >> s >> x;
  bool ans = true;
  for (int i = 0; i < s.size(); i++) {
    cnt0[int(s[i]) - 48]++;
  }
  for (int i = 0; i < x.size(); i++) {
    cnt1[int(x[i]) - 48]++;
  }
  for (int i = 0; i < 10; i++) {
    if (cnt0[i] != cnt1[i]) {
      ans = false;
      break;
    }
  }
  if (!ans) {
    cout << "WRONG_ANSWER\n";
  } else {
    if (check(s) == "ABC") {
      if (s.size() == x.size()) {
        cout << "OK\n";
      } else {
        cout << "WRONG_ANSWER\n";
      }
    } else if (check(s) == x) {
      cout << "OK\n";
    } else {
      cout << "WRONG_ANSWER\n";
    }
  }
}
