#include <bits/stdc++.h>
using namespace std;
void solve();
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
struct Node {
  bool prime;
  int spf;
};
vector<Node> seive(int &n) {
  vector<Node> A(n + 1);
  for (int i = 0; i <= n; i++) A[i].prime = true, A[i].spf = i;
  A[0].prime = A[1].prime = false;
  for (int i = 2; i * i <= n; i++)
    if (A[i].prime)
      for (int j = i * i; j <= n; j += i) {
        A[j].prime = false;
        if (A[j].spf == j) A[j].spf = i;
      }
  return A;
}
int check(vector<Node> &A, vector<int> &B, int n) {
  while (n != 1) {
    if (B[A[n].spf] != -1) return B[A[n].spf];
    n /= A[n].spf;
  }
  return 0;
}
void update(vector<Node> &A, vector<int> &B, int n, int u) {
  B[n] = u;
  while (n != 1) {
    B[A[n].spf] = u;
    n /= A[n].spf;
  }
}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<Node> A = seive(n);
  vector<int> B(n + 1, -1);
  while (m--) {
    char ch;
    int n;
    cin >> ch >> n;
    if (ch == '+') {
      if (B[n] == n)
        cout << "Already on";
      else {
        int t = check(A, B, n);
        if (t == 0) {
          update(A, B, n, n);
          cout << "Success";
        } else
          cout << "Conflict with " << t;
      }
    } else {
      if (B[n] != n)
        cout << "Already off";
      else {
        update(A, B, n, -1);
        cout << "Success";
      }
    }
    cout << "\n";
  }
}
