#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 50;
vector<int> a[N];
bool ans[N];
int aval[N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 2; i <= n; i++) {
    if (a[i].empty() == true) {
      for (int j = 1; j * i <= n; j++) {
        a[i * j].push_back(i);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    char x;
    int y;
    cin >> x >> y;
    if (x == '-') {
      if (ans[y] == 0) cout << "Already off";
      if (ans[y] == 1) {
        ans[y] = 0;
        for (int i = 0; i < a[y].size(); i++) aval[a[y][i]] = 0;
        cout << "Success";
      }
    }
    if (x == '+') {
      if (ans[y] == 1)
        cout << "Already on";
      else {
        int cnt = 0;
        for (int i = 0; i < a[y].size(); i++) {
          if (aval[a[y][i]] > 0) {
            for (int j = 0; j < i; j++) aval[a[y][j]] = 0;
            cout << "Conflict with " << aval[a[y][i]];
            cnt = 1;
            break;
          }
          if (aval[a[y][i]] == 0) {
            aval[a[y][i]] = y;
          }
        }
        if (cnt == 0) {
          ans[y] = 1;
          cout << "Success";
        }
      }
    }
    cout << endl;
  }
  return 0;
}
