#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const double EPS = 1e-9;
const double PI = acos(-1.0);
int prime[1000];
int p[800], k;
int n, m;
vector<pair<int, int> > fact[100001];
void factorizar(int num) {
  int i = num;
  fact[i].clear();
  if (i <= 1) return;
  for (int j = 0; j < k && p[j] * p[j] <= num; j++)
    if (num % p[j] == 0) {
      int cnt = 0;
      while (num % p[j] == 0) cnt++, num /= p[j];
      fact[i].push_back(pair<int, int>(p[j], cnt));
    }
  if (num > 1) {
    fact[i].push_back(pair<int, int>(num, 1));
  }
}
int esta[100001];
int main(void) {
  for (int i = (0); i < int((1000)); i++) prime[i] = true;
  prime[2] = true;
  k = 0;
  p[k++] = 2;
  for (int i = 4; i < 1000; i += 2) prime[i] = false;
  for (int i = 3; i < 1000; i += 2)
    if (prime[i]) {
      p[k++] = i;
      for (int j = i * i; j < 1000; j += i) prime[i] = false;
    }
  cin >> n >> m;
  for (int i = (1); i < int((n + 1)); i++) factorizar(i);
  memset(esta, 0, sizeof(esta));
  multiset<int> second;
  int x;
  char op;
  for (int q = (0); q < int((m)); q++) {
    cin >> op >> x;
    if (op == '-') {
      if (!esta[x])
        cout << "Already off" << endl;
      else {
        for (int i = (0); i < int((((int)(fact[x].size())))); i++)
          for (int j = (0); j < int((fact[x][i].second)); j++)
            second.erase(fact[x][i].first);
        esta[x] = false;
        cout << "Success" << endl;
      }
    } else {
      if (esta[x])
        cout << "Already on" << endl;
      else {
        int i = ((int)(fact[x].size())) - 1;
        for (; i >= 0; i--)
          if (second.find(fact[x][i].first) != second.end()) break;
        int pr = fact[x][i].first;
        if (i >= 0) {
          for (int t = pr; t < 100001; t += pr)
            if (esta[t]) {
              cout << "Conflict with " << t << endl;
              break;
            }
        } else {
          cout << "Success" << endl;
          for (int i = (0); i < int((((int)(fact[x].size())))); i++)
            for (int j = (0); j < int((fact[x][i].second)); j++)
              second.insert(fact[x][i].first);
          esta[x] = true;
        }
      }
    }
  }
  return 0;
}
