#include <bits/stdc++.h>
using namespace std;
ifstream in("input.txt", ifstream::in);
ofstream out("output.txt", ofstream::out);
vector<int> func(int a) {
  vector<int> res(1, a);
  for (int i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      res.push_back(i);
      a /= i;
      while (a % i == 0) {
        a /= i;
      }
    }
  }
  if (a != 1) res.push_back(a);
  return res;
}
vector<vector<int> > A;
int main() {
  int n, m, i = 0;
  cin >> n >> m;
  vector<bool> Used(n);
  vector<bool> PU(n);
  vector<int> When(n, -1);
  if (i == m) return 0;
  for (; i < m; i++) {
    char y;
    int t;
    cin >> y >> t;
    A.push_back(func(t));
    if (y == '+') {
      if (Used[t - 1]) {
        cout << "Already on\n";
      } else {
        bool ok = true;
        for (int k = 1; k < A[i].size(); k++) {
          if (PU[A[i][k]]) {
            cout << "Conflict with " << A[When[A[i][k]]][0] << endl;
            ok = false;
            break;
          }
        }
        if (ok) {
          Used[t - 1] = true;
          for (int k = 1; k < A[i].size(); k++) {
            PU[A[i][k]] = true;
            When[A[i][k]] = i;
          }
          cout << "Success\n";
        }
      }
    } else {
      if (!Used[t - 1]) {
        cout << "Already off\n";
      } else {
        cout << "Success\n";
        for (int k = 1; k < A[i].size(); k++) {
          PU[A[i][k]] = false;
          When[A[i][k]] = -1;
        }
        Used[t - 1] = false;
      }
    }
  }
  return 0;
}
