#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int pri[N], pnum, mindiv[N], a[N];
bool vis[N];
int curp[1111], cntp[1111];
void get_prime(int n) {
  vis[1] = 1;
  pnum = 0;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      pri[pnum++] = i;
      mindiv[i] = i;
    }
    for (int j = 0; j < pnum; j++) {
      if (i * pri[j] > n) break;
      vis[i * pri[j]] = 1;
      mindiv[i * pri[j]] = pri[j];
      if (i % pri[j] == 0) break;
    }
  }
}
int main() {
  get_prime(100000);
  int n, m;
  memset(vis, 0, sizeof(vis));
  bool fuck = false;
  scanf("%d%d", &n, &m);
  while (m--) {
    char op[2];
    int x;
    scanf("%s%d", op, &x);
    if (x == 1) {
      if (op[0] == '+') {
        if (fuck)
          puts("Already on");
        else
          puts("Success"), fuck = true;
      } else {
        if (fuck)
          puts("Success"), fuck = false;
        else
          puts("Already off");
      }
      continue;
    }
    int tot = 0;
    int cur = x;
    while (cur > 1) {
      curp[tot] = mindiv[cur];
      cntp[tot] = 0;
      while (cur % curp[tot] == 0) cur /= curp[tot], cntp[tot]++;
      tot++;
    }
    if (op[0] == '+') {
      bool flag = true;
      int id;
      for (int j = 0; j < tot; j++)
        if (vis[curp[j]]) {
          flag = false;
          id = j;
          break;
        }
      if (flag) {
        for (int j = 0; j < tot; j++) vis[curp[j]] = 1, a[curp[j]] = x;
        puts("Success");
      } else if (vis[curp[0]] && a[curp[0]] == x)
        puts("Already on");
      else {
        printf("Conflict with %d\n", a[curp[id]]);
      }
    } else {
      if (vis[curp[0]] && a[curp[0]] == x) {
        puts("Success");
        for (int j = 0; j < tot; j++) vis[curp[j]] = 0;
      } else
        puts("Already off");
    }
  }
  return 0;
}
