#include <bits/stdc++.h>
using namespace std;
int N, Q;
int prime[100005], pn;
bool unprime[100005];
int mk[100005];
void get_prime() {
  memset(unprime, 0, sizeof(unprime));
  pn = 0;
  int i, j;
  prime[pn++] = 1;
  for (i = 2; i < 100005; i++) {
    if (unprime[i]) continue;
    prime[pn++] = i;
    if (i > 400) continue;
    for (j = i * i; j < 100005; j += i) unprime[j] = 1;
  }
}
bool op[100005];
int tnum[100000], tn;
int findit(int x) {
  int l = 0, h = pn - 1, mid;
  while (h > l) {
    mid = (h + l + 1) >> 1;
    if (prime[mid] > x)
      h = mid - 1;
    else
      l = mid;
  }
  return h;
}
int conf(int x) {
  tn = 0;
  int i, tx = x;
  for (i = 1; prime[i] * prime[i] <= x && i < pn; i++) {
    if (x % prime[i]) continue;
    if (mk[i] != -1) return mk[i];
    tnum[tn++] = i;
    while (x % prime[i] == 0) x /= prime[i];
  }
  int loc;
  if (x > 1) {
    loc = findit(x);
    if (mk[loc] != -1) return mk[loc];
    tnum[tn++] = loc;
  }
  for (i = 0; i < tn; i++) mk[tnum[i]] = tx;
  return -1;
}
void del(int x) {
  int i;
  for (i = 1; prime[i] * prime[i] <= x && i < pn; i++) {
    if (x % prime[i]) continue;
    mk[i] = -1;
    while (x % prime[i] == 0) x /= prime[i];
  }
  int loc;
  if (x > 1) {
    loc = findit(x);
    mk[loc] = -1;
  }
}
void run() {
  int a, t;
  memset(op, 0, sizeof(op));
  memset(mk, -1, sizeof(mk));
  char com[2];
  while (Q--) {
    scanf("%s%d", com, &a);
    if (com[0] == '+') {
      if (op[a])
        printf("Already on\n");
      else {
        t = conf(a);
        if (t == -1) {
          printf("Success\n");
          op[a] = 1;
        } else {
          printf("Conflict with %d\n", t);
        }
      }
    } else {
      if (!op[a])
        printf("Already off\n");
      else {
        del(a);
        op[a] = 0;
        printf("Success\n");
      }
    }
  }
}
int main() {
  get_prime();
  scanf("%d%d", &N, &Q);
  run();
  return 0;
}
