#include <bits/stdc++.h>
using namespace std;
const int maxn = 100009;
int n, m, id;
int p[maxn], v[maxn];
bool coll[maxn];
char ch;
void add(int id) {
  if (coll[id]) {
    printf("Already on\n");
  } else {
    for (int j = id; j > 1; j /= p[j]) {
      if (v[p[j]]) {
        printf("Conflict with %d\n", v[p[j]]);
        return;
      }
    }
    for (int j = id; j > 1; j /= p[j]) v[p[j]] = id;
    coll[id] = true;
    printf("Success\n");
  }
  return;
}
void del(int id) {
  if (!coll[id]) {
    printf("Already off\n");
  } else {
    for (int j = id; j > 1; j /= p[j]) {
      v[p[j]] = 0;
    }
    coll[id] = false;
    printf("Success\n");
  }
  return;
}
int main() {
  while (cin >> n >> m) {
    memset(p, 0, sizeof(p));
    p[1] = 1;
    for (int i = 2; i <= n; ++i) {
      if (p[i] == 0) {
        for (int j = i; j <= n; j += i) p[j] = i;
      }
    }
    memset(coll, false, sizeof(coll));
    memset(v, 0, sizeof(v));
    for (int i = 0; i < m; ++i) {
      cin >> ch;
      cin >> id;
      if (ch == '+') {
        add(id);
      } else if (ch == '-') {
        del(id);
      }
    }
  }
  return 0;
}
