#include <bits/stdc++.h>
using namespace std;
vector<long long> fact(201, 1);
long long gcd(long long n1, long long n2) {
  long long maxm = max(n1, n2);
  long long minm = min(n1, n2);
  if ((maxm % minm) == 0)
    return minm;
  else
    return gcd(minm, maxm % minm);
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2) % 1000000007;
  if (y % 2 == 0)
    return temp * temp % 1000000007;
  else
    return (x * temp % 1000000007) * temp % 1000000007;
}
long long ifact(long long k) {
  return power(fact[k], 1000000007 - 2) % 1000000007;
}
long long ncr(long long n, long long r) {
  if (n < r) return 0;
  long long num = 1;
  long long den = 1;
  long long g;
  for (int i = 1; i < r + 1; i++) {
    num = num * (n - i + 1);
    den = den * (i);
    g = gcd(num, den);
    num = num / g;
    den = den / g;
  }
  return num;
}
long long spf[100001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 100001; i++) spf[i] = i;
  for (int i = 2; i < sqrt(100001); i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 100001; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
  long long t = 1;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    vector<bool> st(n + 1, false);
    map<long long, long long> make_pair;
    while (m--) {
      string s, s2;
      cin >> s >> s2;
      int x = stoi(s2);
      if (s[0] == '+') {
        if (st[x]) {
          cout << "Already on" << endl;
        } else {
          bool t = false;
          long long temp = x;
          vector<long long> ufac;
          long long prev = -1;
          while (temp != 1) {
            if (spf[temp] != prev) {
              if (make_pair.find(spf[temp]) == make_pair.end()) {
                ufac.push_back(spf[temp]);
              } else if (st[(make_pair[spf[temp]])] == false) {
                ufac.push_back(spf[temp]);
              } else {
                t = true;
                break;
              }
            }
            prev = spf[temp];
            temp /= spf[temp];
          }
          if (t) {
            cout << "Conflict with"
                 << " " << make_pair[spf[temp]] << endl;
          } else {
            for (int i = 0; i < ufac.size(); i++) {
              make_pair[ufac[i]] = x;
            }
            st[x] = true;
            cout << "Success" << endl;
          }
        }
      } else {
        if (!st[x])
          cout << "Already off" << endl;
        else {
          st[x] = false;
          cout << "Success" << endl;
        }
      }
    }
  }
}
