#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int MAXM = 1e5;
int n, m, cnt;
vector<int> fac[MAXM + 10];
bool prime[MAXM + 10];
int rec[MAXM + 10];
int vis[MAXM + 10];
bool st[MAXM + 10];
void init0() {
  memset(rec, 0, sizeof(rec));
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  prime[2] = true;
  for (int i = 2; i <= MAXM; i++) {
    if (prime[i]) {
      rec[cnt++] = i;
      for (int j = i * 2; j <= MAXM; j = j + i) prime[j] = false;
    }
  }
}
void init1() {
  for (int i = 1; i <= n; i++) {
    int tmp = i;
    for (int j = 0; j < cnt; j++) {
      if (rec[j] * rec[j] > i) break;
      if (tmp % rec[j] == 0) {
        fac[i].push_back(rec[j]);
        while (tmp % rec[j] == 0) tmp = tmp / rec[j];
      }
    }
    if (tmp != 1) fac[i].push_back(tmp);
  }
}
int main() {
  cnt = 0;
  init0();
  scanf("%d%d", &n, &m);
  init1();
  char op;
  int num;
  memset(st, false, sizeof(st));
  memset(vis, 0, sizeof(vis));
  while (m--) {
    scanf(" %c%d", &op, &num);
    if (op == '+') {
      if (st[num])
        printf("Already on\n");
      else {
        bool flag = true;
        int p = 0;
        for (int i = 0; i < (int)fac[num].size(); i++) {
          if (vis[fac[num][i]] != 0) {
            flag = false;
            p = vis[fac[num][i]];
            break;
          }
        }
        if (flag) {
          printf("Success\n");
          st[num] = true;
          for (int i = 0; i < (int)fac[num].size(); i++) vis[fac[num][i]] = num;
        } else
          printf("Conflict with %d\n", p);
      }
    } else {
      if (!st[num])
        printf("Already off\n");
      else {
        st[num] = false;
        printf("Success\n");
        for (int i = 0; i < (int)fac[num].size(); i++)
          if (vis[fac[num][i]] != 0) vis[fac[num][i]] = 0;
      }
    }
  }
  return 0;
}
