#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979;
const double PI2 = 6.28318530717958;
const double PId2 = 1.570796326794895;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
long long pw(long long a, long long p, int mod) {
  long long res = 1;
  while (p) {
    if (p & 1) {
      --p;
      res = (res * a) % mod;
    } else {
      p >>= 1;
      a = (a * a) % mod;
    }
  }
  return res;
}
inline vector<int> ReadVI(int count) {
  vector<int> arrayname(count);
  for (int i = 0; i < count; i++) cin >> arrayname[i];
  return arrayname;
}
inline vector<long long> ReadVlong(int count) {
  vector<long long> arrayname(count);
  for (int i = 0; i < count; i++) cin >> arrayname[i];
  return arrayname;
}
const int MOD = 1000000007;
const int MAXVALUE = 10000001;
vector<int> factor(int k) {
  vector<int> res;
  for (int i = 2; i * i <= k; i++) {
    if (k % i == 0) {
      res.push_back(i);
      while (k % i == 0) k /= i;
    }
  }
  if (k != 1) res.push_back(k);
  return res;
}
int main() {
  int n, m, k;
  char c;
  cin >> n >> m;
  vector<int> on(n + 1);
  vector<int> f(n + 1);
  for (int i = 0; i < m; i++) {
    cin >> c >> k;
    vector<int> p = factor(k);
    if (c == '-') {
      if (on[k]) {
        on[k] = 0;
        for (int j = 0; j < p.size(); j++) f[p[j]] = 0;
        cout << "Success" << endl;
      } else
        cout << "Already off" << endl;
    } else {
      if (on[k])
        cout << "Already on" << endl;
      else {
        bool flag = 1;
        for (int j = 0; j < p.size(); j++)
          if (p[j] > 1 && f[p[j]] != 0) {
            cout << "Conflict with " << f[p[j]] << endl;
            flag = 0;
            break;
          }
        if (flag) {
          for (int j = 0; j < p.size(); j++) f[p[j]] = k;
          on[k] = 1;
          cout << "Success" << endl;
        }
      }
    }
  }
  return 0;
}
