#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 100;
const long long INF = 9 * (long long)(1e18);
const long double PI = 3.14159265358979323846;
long long int modexp(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res % p;
}
vector<int> is_prime(N + 1, 0);
void sieve(long long int n) {
  for (long long int i = 1; i <= N; i++) is_prime[i] = i;
  for (long long int i = 2; i <= N; i += 2) is_prime[i] = 2;
  for (long long int i = 2; i * i <= n; i++) {
    if (is_prime[i] == i) {
      for (long long int j = i * i; j <= n; j += i)
        if (is_prime[j] == j) is_prime[j] = i;
    }
  }
}
vector<long long int> factors[N + 1];
map<long long int, int> dist;
void factorize(long long int n) {
  for (long long int i = 2; i <= n; i++) {
    long long int x = i;
    while (x != 1) {
      factors[i].push_back(is_prime[x]);
      dist.insert(make_pair(is_prime[x], 0));
      x /= is_prime[x];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  sieve(n);
  factorize(n);
  int checkone = 0;
  while (m--) {
    char c;
    long long int x;
    cin >> c >> x;
    if (c == '-') {
      if (x != 1) {
        vector<long long int> v = factors[x];
        int flag = 1;
        for (long long int i = 0; i <= (int)v.size() - 1; i++) {
          if (dist[v[i]] == x) {
            flag = 0;
            dist[v[i]] = 0;
          }
        }
        if (flag)
          cout << "Already off"
               << "\n";
        else
          cout << "Success"
               << "\n";
      } else {
        if (checkone) {
          checkone = 0;
          cout << "Success"
               << "\n";
        } else
          cout << "Already off"
               << "\n";
      }
    } else {
      if (x != 1) {
        vector<long long int> v = factors[x];
        int flag = 1, conf = 1;
        for (long long int i = 0; i <= (int)v.size() - 1; i++) {
          if (dist[v[i]] != 0) {
            flag = 0;
            conf = dist[v[i]];
            break;
          }
        }
        if (flag == 0) {
          if (conf != x)
            cout << "Conflict with " << conf << "\n";
          else
            cout << "Already on"
                 << "\n";
        } else {
          for (long long int i = 0; i <= (int)v.size() - 1; i++) {
            dist[v[i]] = x;
          }
          cout << "Success"
               << "\n";
        }
      } else {
        if (checkone)
          cout << "Already on"
               << "\n";
        else {
          checkone = 1;
          cout << "Success"
               << "\n";
        }
      }
    }
  }
}
