#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double E = exp(1);
template <class T1>
void deb(T1 e) {
  cout << "-->" << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << "-->" << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << "-->" << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << "-->" << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <typename T>
inline T sqr(T n) {
  return n * n;
}
inline double hypot(double x, double y) { return sqrt(sqr(x) + sqr(y)); }
template <typename T>
inline T pmod(T n, T m) {
  return ((n % m) + m) % m;
}
template <typename T>
T power(T n, int p) {
  return (p == 0) ? (T)(1) : (sqr(power(n, p >> 1)) * ((p & 1) * (n - 1) + 1));
}
template <typename T>
T bigmod(T n, int p, T m) {
  return (p == 0)
             ? (T)(1)
             : ((sqr(bigmod(n, p >> 1, m)) % m) * ((p & 1) * (n - 1) % m + 1)) %
                   m;
}
int flag[100100], push[100100];
vector<int> primes;
vector<int> pr_fact[100100];
bool marked[100100];
bool isPrime(int n) {
  if (n < 2) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  return marked[n] == false;
}
void sieve(int n) {
  for (int i = 3; i * i <= n; i += 2) {
    if (!marked[i]) {
      for (int j = i + i; j <= n; j += i) marked[j] = true;
    }
  }
}
void prime_factorize() {
  for (int j = 1; j < 100010; j++) {
    int v = j;
    for (int i = 0; sqr(primes[i]) <= v; i++) {
      if (!(v % primes[i])) {
        pr_fact[j].push_back(primes[i]);
        while (!(v % primes[i])) {
          v /= primes[i];
        }
      }
    }
    if (isPrime(v)) pr_fact[j].push_back(v);
  }
}
void precalculate() {
  sieve(100010);
  for (int i = 1; i < 100010; i++) {
    if (isPrime(i)) primes.push_back(i);
  }
  prime_factorize();
}
int main() {
  precalculate();
  memset(flag, 0, sizeof(flag));
  memset(push, -1, sizeof(push));
  int x, f, n, m, test = 0;
  string req;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    f = 0;
    cin >> req >> x;
    if (req == "+") {
      if (flag[x]) {
        printf("Already on\n");
      } else {
        int flag2 = 0;
        for (int j = 0; j < (int)pr_fact[x].size(); j++) {
          if (push[pr_fact[x][j]] != -1) {
            flag2 = 1;
            f = push[pr_fact[x][j]];
            printf("Conflict with %d\n", f);
            break;
          }
        }
        if (!flag2) {
          flag[x] = 1;
          printf("Success\n");
          for (int j = 0; j < (int)pr_fact[x].size(); j++) {
            push[pr_fact[x][j]] = x;
          }
        }
      }
    } else {
      if (!flag[x]) {
        printf("Already off\n");
      } else {
        flag[x] = 0;
        printf("Success\n");
        for (int j = 0; j < (int)pr_fact[x].size(); j++)
          push[pr_fact[x][j]] = -1;
      }
    }
  }
  return 0;
}
