#include <bits/stdc++.h>
using namespace std;
static const int maxn = 100010;
bool isp[maxn];
int prime[maxn], lp;
void gen_prime() {
  int i, j;
  memset(isp, true, sizeof isp);
  isp[0] = isp[1] = false;
  lp = 0;
  for (i = 2; i < maxn; ++i) {
    if (isp[i]) prime[lp++] = i;
    for (j = 0; j < lp && prime[j] * i < maxn; ++j) {
      isp[prime[j] * i] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
int n, m;
char op[10];
bool state[maxn];
list<int> pcnt[maxn];
int fac[maxn][7];
int top;
int main() {
  gen_prime();
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 1; i <= n; ++i) state[i] = false;
    for (int i = 0; i <= n; ++i) {
      for (int j = 0; j < 7; ++j) {
        fac[i][j] = -1;
      }
    }
    for (int v = 1; v <= n; ++v) {
      top = 0;
      int vv = v;
      int sqrtv = (int)sqrt((double)vv);
      for (int i = 0; prime[i] <= sqrtv && i < maxn; ++i) {
        if (vv % prime[i] == 0) {
          fac[v][top++] = prime[i];
          while (vv % prime[i] == 0) vv /= prime[i];
        }
      }
      if (vv != 1) fac[v][top++] = vv;
    }
    while (m--) {
      int v;
      scanf("%s%d", op, &v);
      if (op[0] == '+') {
        if (state[v]) {
          printf("Already on\n");
        } else {
          bool found = false;
          int val = -1;
          int vv = v;
          for (int i = 0; i < 6 && fac[vv][i] != -1; ++i) {
            if (pcnt[fac[vv][i]].size() != 0) {
              found = true;
              val = pcnt[fac[vv][i]].back();
            }
          }
          if (found) {
            printf("Conflict with %d\n", val);
          } else {
            state[vv] = true;
            printf("Success\n");
            for (int i = 0; i < 6 && fac[vv][i] != -1; ++i) {
              pcnt[fac[vv][i]].push_back(vv);
            }
          }
        }
      } else {
        if (!state[v]) {
          printf("Already off\n");
        } else {
          int vv = v;
          for (int i = 0; i < 6 && fac[vv][i] != -1; ++i) {
            list<int>::iterator it;
            for (it = pcnt[fac[vv][i]].begin(); it != pcnt[fac[vv][i]].end();
                 ++it) {
              if (*it == vv) pcnt[fac[vv][i]].erase(it);
              break;
            }
          }
          state[vv] = false;
          printf("Success\n");
        }
      }
    }
  }
  return 0;
}
