#include <bits/stdc++.h>
long long fact[200001];
long long inf = 1e18;
long long z = 1e9 + 7;
long long gdp(long long a, long long b) { return (a - (a % b)); }
long long ld(long long a, long long b) {
  if (a < 0) return -1 * gdp(abs(a), b);
  if (a % b == 0) return a;
  return (a + (b - a % b));
}
long long gd(long long a, long long b) {
  if (a < 0) return (-1 * ld(abs(a), b));
  return (a - (a % b));
}
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long e_gcd(long long a, long long b, long long &x, long long &y) {
  if (b > a) return e_gcd(b, a, y, x);
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  e_gcd(b, a % b, x1, y1);
  x = y1;
  y = (x1 - ((a / b) * y1));
  return e_gcd(b, a % b, x1, y1);
}
long long power(long long a, long long b, long long p) {
  if (b == 0) return 1;
  long long c = power(a, b / 2, p);
  if (b % 2 == 0)
    return ((c * c) % p);
  else
    return ((((c * c) % p) * a) % p);
}
long long inverse(long long a, long long n) { return power(a, n - 2, n); }
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long left(long long i) { return ((2 * i) + 1); }
long long right(long long i) { return ((2 * i) + 2); }
long long ncr(long long n, long long r) {
  if (n < r || (n < 0) || (r < 0)) return 0;
  return ((((fact[n] * inverse(fact[r], z)) % z) * inverse(fact[n - r], z)) %
          z);
}
void swap(char &a, char &b) {
  char c = a;
  a = b;
  b = c;
  return;
}
long double pi = acos(-1);
long long pow(long long a, long long b) {
  if (b == 0) return 1;
  long long c = pow(a, b / 2);
  if (b % 2 == 0)
    return (c * c);
  else
    return ((c * c) * a);
}
using namespace std;
struct mytype {
  bool a;
  long long b;
};
const int N = 4e5 + 7;
void solve() {
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  vector<long long> primef[n + 1];
  vector<long long> used(n + 1, 1);
  for (long long i = 2; i <= n; i++) {
    if (!used[i]) continue;
    primef[i].push_back(i);
    for (long long j = 2 * i; j <= n; j += i) {
      primef[j].push_back(i);
      used[j] = 0;
    }
  }
  set<long long> pf;
  set<long long> s;
  map<long long, long long> m;
  while (k--) {
    char c;
    long long num;
    cin >> c >> num;
    if (c == '+') {
      bool f = 1;
      auto it = s.find(num);
      if (it != s.end()) {
        cout << "Already on" << endl;
        continue;
      }
      for (auto x : primef[num]) {
        auto it = pf.find(x);
        if (it != pf.end()) {
          cout << "Conflict with " << m[x] << endl;
          f = 0;
          break;
        }
      }
      if (f) {
        cout << "Success" << endl;
        s.insert(num);
        for (auto x : primef[num]) {
          pf.insert(x);
          m[x] = num;
        }
      }
    } else {
      auto it = s.find(num);
      if (it != s.end()) {
        cout << "Success" << endl;
        for (auto x : primef[num]) pf.erase(x);
        s.erase(it);
      } else {
        cout << "Already off" << endl;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
