#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = long double;
using str = string;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<db>;
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
template <class T>
using V = vector<T>;
template <class T, size_t SZ>
using AR = array<T, SZ>;
template <class T>
using PR = pair<T, T>;
template <class T>
int lwb(V<T> &a, const T &b) {
  return int(lower_bound(begin(a), end(a), b) - begin(a));
}
const int MOD = 1e9 + 7;
const int MODD = 998244353;
const int MX = 2e5 + 5;
const ll INF = 1e18;
const db PI = acos((db)-1);
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rngl(
    (uint64_t)chrono::steady_clock::now().time_since_epoch().count());
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
constexpr int pct(int x) { return __builtin_popcount(x); }
constexpr int largest_bit(int x) { return x == 0 ? -1 : 31 - __builtin_clz(x); }
constexpr ll p2(ll x) { return 1LL << x; }
constexpr ll msk2(ll x) { return p2(x) - 1; }
ll cdiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); }
ll fdiv(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }
template <class T>
bool ckmin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
template <class T, class U>
T fstTrue(T lo, T hi, U first) {
  hi++;
  assert(lo <= hi);
  while (lo < hi) {
    T mid = lo + (hi - lo) / 2;
    first(mid) ? hi = mid : lo = mid + 1;
  }
  return lo;
}
template <class T, class U>
T lstTrue(T lo, T hi, U first) {
  lo--;
  assert(lo <= hi);
  while (lo < hi) {
    T mid = lo + (hi - lo + 1) / 2;
    first(mid) ? lo = mid : hi = mid - 1;
  }
  return lo;
}
template <class T>
void remDup(vector<T> &v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
template <class T, class U>
void erase(T &t, const U &u) {
  auto it = t.find(u);
  assert(it != end(t));
  t.erase(it);
}
template <class T>
vector<pair<T, T>> prime_factors(T n) {
  vector<pair<T, T>> re;
  for (T i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      T count = 0;
      while (n % i == 0) {
        count++;
        n /= i;
      }
      re.push_back(make_pair(i, count));
    }
  }
  if (n != 1) re.push_back(make_pair(n, 1));
  return re;
}
void solve() {
  int n, m;
  cin >> n >> m;
  vb status(n + 1, false);
  vi who(n + 1);
  set<int> on;
  for (int i = (0); i < (m); ++i) {
    char c;
    int a;
    cin >> c >> a;
    if (c == '+') {
      vpi fac = prime_factors<int>(a);
      if (a == 1) fac.push_back(make_pair(1, 1));
      bool ok = true;
      for (auto &i : fac) {
        if (status[i.first]) {
          ok = false;
          if (who[i.first] == a) {
            cout << "Already on\n";
            break;
          } else {
            cout << "Conflict with " << who[i.first] << '\n';
            break;
          }
        }
      }
      if (ok) {
        for (auto &i : fac) {
          status[i.first] = true;
          who[i.first] = a;
        }
        on.insert(a);
        cout << "Success\n";
      }
    } else {
      if (on.count(a) == 0) {
        cout << "Already off\n";
      } else {
        vpi fac = prime_factors<int>(a);
        if (a == 1) fac.push_back(make_pair(1, 1));
        for (auto &i : fac) {
          status[i.first] = false;
          who[i.first] = 0;
        }
        on.erase(a);
        cout << "Success\n";
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
