#include <bits/stdc++.h>
int l1, l2, c;
char ch, ds1[11], ds2[11], md;
int main() {
  while ((ch = getchar()) != '\n') ds1[l1++] = ch;
  c = 0;
  while ((ch = getchar()) != '\n') ds2[l2++] = ch;
  c = 0;
  if (l1 != l2) {
    puts("WRONG_ANSWER");
    return 0;
  }
  md = '0';
  for (int i = 0; i < l1; i++) {
    if (ds1[i] > '0' && md == '0') md = ds1[i];
    if (ds1[i] > '0' && ds1[i] < md) md = ds1[i];
  }
  std::sort(ds1, ds1 + l1);
  if (md != ds2[0]) {
    puts("WRONG_ANSWER");
    return 0;
  }
  c = 1;
  for (int i = 0; i < l1; i++) {
    if (ds1[i] == md) {
      md = 0;
      continue;
    }
    if (ds1[i] != ds2[c++]) {
      puts("WRONG_ANSWER");
      return 0;
    }
  }
  puts("OK");
}
