#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int r0, long long int r1) {
  if (r0 == 0 || r1 == 0) return 1;
  if (r0 < r1) return gcd(r1, r0);
  if (r0 % r1 == 0) return r1;
  return gcd(r1, r0 % r1);
}
int t, n, m;
int ni() {
  int temp;
  scanf("%d", &temp);
  return temp;
}
long long int nl() {
  long long int temp;
  scanf("%lld", &temp);
  return temp;
}
long long unsigned int nlu() {
  long long unsigned int temp;
  scanf("%llu", &temp);
  return temp;
}
float nf() {
  float temp;
  scanf("%f", &temp);
  return temp;
}
double nd() {
  double temp;
  scanf("%lf", &temp);
  return temp;
}
int a[100000], p[100001], ncnt[100001][20], f[100001];
map<int, int> primes[100000];
int main() {
  for (int i = 0; i < 100001; i++) {
    p[i] = 1;
    f[i] = 0;
  }
  p[0] = 0;
  p[1] = 0;
  for (int i = 2; i < 100001; i++) {
    if (p[i] == 1) {
      ncnt[i][0] = i;
      f[i] = 1;
      long long int temp = i + i;
      while (temp < 100001) {
        p[temp] = 0;
        int at = f[temp];
        ncnt[temp][at] = i;
        f[temp]++;
        temp += i;
      }
    }
  }
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    a[i] = 0;
  }
  char s[2];
  int x;
  for (int req = 0; req < m; req++) {
    cin >> s >> x;
    x--;
    if (s[0] == '-') {
      if (a[x] == 0) {
        cout << "Already off\n";
      } else {
        a[x] = 0;
        int temp = x + 1;
        int till = f[temp];
        for (int i = 0; i < till; i++) {
          int v = ncnt[temp][i];
          primes[v].erase(temp);
        }
        cout << "Success\n";
      }
    } else {
      if (a[x] == 1) {
        cout << "Already on\n";
      } else {
        int temp = x + 1;
        int flag = 0;
        int at = -1;
        int till = f[temp];
        for (int i = 0; i < till; i++) {
          int v = ncnt[temp][i];
          if (primes[v].size() != 0) {
            flag = 1;
            at = v;
            break;
          }
        }
        if (flag) {
          cout << "Conflict with " << primes[at].begin()->first << "\n";
        } else {
          cout << "Success\n";
          for (int i = 0; i < till; i++) {
            int v = ncnt[temp][i];
            primes[v][temp] = 1;
          }
          a[x] = 1;
        }
      }
    }
  }
  return 0;
}
