#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
int gcd(int a, int b) {
  while (b) {
    int t = a % b;
    a = b;
    b = t;
  }
  return a;
}
void sieve(int n) {
  vector<int> is(n + 1, 1);
  is[1] = 0;
  for (long long i = 2; i <= n; ++i) {
    if (is[i]) {
      for (long long j = i * i; (j > i && j <= n); j += i) is[j] = false;
    }
    primes.push_back(i);
  }
}
inline vector<pair<int, int> > factorized(int n) {
  vector<pair<int, int> > res;
  for (int i = 0; i < primes.size() && primes[i] * primes[i] <= n; ++i) {
    if (n % primes[i] == 0) {
      int q = 0;
      while (n % primes[i] == 0) {
        ++q;
        n /= primes[i];
      }
      res.push_back(make_pair(primes[i], q));
    }
  }
  if (n > 1) {
    res.push_back(make_pair(n, 1));
  }
  return res;
}
int main() {
  int n, m;
  cin >> n >> m;
  sieve(n);
  vector<int> ison(n + 1, 0);
  vector<int> pmap(n + 1, 0);
  for (int i = 0; i < m; ++i) {
    char op;
    int num;
    cin >> op >> num;
    string res = "";
    if (op == '+') {
      bool ok = true;
      if (ison[num] == 1) {
        ok = false;
        cout << "Already on";
      }
      vector<pair<int, int> > fact = factorized(num);
      if (ok) {
        for (int j = 0; j < fact.size(); ++j) {
          if (pmap[fact[j].first] != 0) {
            cout << "Conflict with " << pmap[fact[j].first];
            ok = false;
            break;
          }
        }
      }
      if (ok) {
        ison[num] = 1;
        for (int j = 0; j < fact.size(); ++j) {
          pmap[fact[j].first] = num;
        }
        cout << "Success";
      }
    } else if (op == '-') {
      if (ison[num] == 0) {
        cout << "Already off";
      } else {
        vector<pair<int, int> > fact = factorized(num);
        for (int j = 0; j < fact.size(); ++j) {
          pmap[fact[j].first] = 0;
        }
        ison[num] = 0;
        cout << "Success";
      }
    }
    cout << res << '\n';
  }
  return 0;
}
