#include <bits/stdc++.h>
template <typename T>
T inline SQR(const T& a) {
  return a * a;
}
template <typename T>
T inline ABS(const T& a) {
  return a < 0 ? -a : a;
}
template <typename T>
T inline MIN(const T& a, const T& b) {
  if (a < b) return a;
  return b;
}
template <typename T>
T inline MAX(const T& a, const T& b) {
  if (a > b) return a;
  return b;
}
const double EPS = 1e-9;
inline int SGN(double a) {
  return ((a > EPS) ? (1) : ((a < -EPS) ? (-1) : (0)));
}
inline int CMP(double a, double b) { return SGN(a - b); }
using namespace std;
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> primefacts[n + 1];
  int prime[n + 1];
  bool on[n + 1];
  primefacts[1].push_back(1);
  on[1] = false;
  prime[1] = 0;
  for (int i = 2; i <= n; i++) {
    if (int((primefacts[i]).size()) == 0) {
      primefacts[i].push_back(i);
      for (int j = i + i; j <= n; j += i) primefacts[j].push_back(i);
    }
    on[i] = false;
    prime[i] = 0;
  }
  char wut;
  int pos;
  while (m--) {
    cin >> wut >> pos;
    if (wut == '+') {
      if (on[pos]) {
        cout << "Already on\n";
      } else {
        bool ok = true;
        for (int i = 0; i < int((primefacts[pos]).size()); ++i) {
          if (prime[primefacts[pos][i]]) {
            cout << "Conflict with " << prime[primefacts[pos][i]] << "\n";
            ok = false;
            break;
          }
        }
        if (ok) {
          cout << "Success\n";
          on[pos] = true;
          for (int i = 0; i < int((primefacts[pos]).size()); ++i)
            prime[primefacts[pos][i]] = pos;
        }
      }
    } else {
      if (!on[pos])
        cout << "Already off\n";
      else {
        on[pos] = false;
        cout << "Success\n";
        for (int i = 0; i < int((primefacts[pos]).size()); ++i)
          prime[primefacts[pos][i]] = 0;
      }
    }
  }
  return 0;
}
