#include <bits/stdc++.h>
using namespace std;
const int maxn = 101000;
set<int> who[10000];
int pr[maxn], n, m, ind[maxn], on[maxn];
int main() {
  scanf("%d%d\n", &n, &m);
  int primecnt = 0;
  pr[1] = true;
  for (int i = 2; i <= n; ++i)
    if (!pr[i]) {
      primecnt++;
      ind[i] = primecnt;
      for (int j = i + i; j <= n; j += i) pr[j] = true;
    }
  for (int it = 0; it < m; ++it) {
    char ch;
    int x;
    scanf("%c %d\n", &ch, &x);
    if (ch == '+') {
      if (on[x]) {
        puts("Already on");
        continue;
      }
      bool found = false;
      for (int j = 1; j * 1ll * j <= x; ++j)
        if (x % j == 0) {
          if (!pr[j] && !who[ind[j]].empty()) {
            printf("Conflict with %d\n", *who[ind[j]].begin());
            found = true;
            break;
          }
          if (!pr[x / j] && !who[ind[x / j]].empty()) {
            printf("Conflict with %d\n", *who[ind[x / j]].begin());
            found = true;
            break;
          }
        }
      if (found) continue;
      on[x] = true;
      puts("Success");
      for (int j = 1; j * 1ll * j <= x; ++j)
        if (x % j == 0) {
          if (!pr[j]) who[ind[j]].insert(x);
          if (!pr[x / j]) who[ind[x / j]].insert(x);
        }
    } else {
      if (!on[x]) {
        puts("Already off");
        continue;
      }
      puts("Success");
      on[x] = false;
      for (int j = 1; j * 1ll * j <= x; ++j)
        if (x % j == 0) {
          if (!pr[j]) who[ind[j]].erase(x);
          if (!pr[x / j]) who[ind[x / j]].erase(x);
        }
    }
  }
  return 0;
}
