#include <bits/stdc++.h>
int use[100010], from[100010];
int prime[110010], flag[110010], pcnt = 0;
int main() {
  int n, m;
  pcnt = 0;
  memset(flag, -1, sizeof(flag));
  for (int i = 2; i <= 110000; i++) {
    if (flag[i]) prime[pcnt++] = i;
    for (int j = 0; j < pcnt && prime[j] <= 110000 / i; j++) {
      flag[i * prime[j]] = 0;
      if (i % prime[j] == 0) break;
    }
  }
  while (scanf("%d%d", &n, &m) == 2) {
    memset(use, 0, sizeof(use));
    memset(from, -1, sizeof(from));
    while (m--) {
      char ope[10];
      int num;
      scanf("%s", ope);
      scanf("%d", &n);
      if (use[n] && ope[0] == '+') {
        printf("Already on\n");
        continue;
      } else if (!use[n] && ope[0] == '-') {
        printf("Already off\n");
        continue;
      }
      int nn = n;
      if (ope[0] == '+') {
        int con = -1;
        for (int i = 0; prime[i] <= n / prime[i]; i++) {
          if (n % prime[i] != 0) continue;
          if (from[prime[i]] != -1) {
            con = from[prime[i]];
            break;
          }
          while (n % prime[i] == 0) n /= prime[i];
        }
        if (n != 1 && con == -1) {
          if (from[n] != -1) {
            con = from[n];
          }
        }
        if (con != -1)
          printf("Conflict with %d\n", con);
        else {
          n = nn;
          for (int i = 0; prime[i] <= n / prime[i]; i++) {
            if (n % prime[i] != 0) continue;
            from[prime[i]] = nn;
            while (n % prime[i] == 0) n /= prime[i];
          }
          if (n != 1) from[n] = nn;
          use[nn] = 1;
          puts("Success");
        }
      } else {
        for (int i = 0; prime[i] <= n / prime[i]; i++) {
          if (n % prime[i] != 0) continue;
          from[prime[i]] = -1;
          while (n % prime[i] == 0) n /= prime[i];
        }
        if (n != 1) from[n] = -1;
        use[nn] = 0;
        puts("Success");
      }
    }
  }
  return 0;
}
