#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
int N, M;
vector<int> pdivisors[100100];
int isOn[100100];
multiset<int> A[100100];
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin.tie(0);
  cin >> N >> M;
  for (int i = 2; i <= N; i++) {
    int cur = i;
    for (int d = 2; d * d <= cur; d++) {
      if (cur % d == 0) {
        pdivisors[i].push_back(d);
        while (cur % d == 0) {
          cur /= d;
        }
      }
    }
    if (cur > 1) pdivisors[i].push_back(cur);
  }
  for (int(i) = 1, j123 = M; (i) <= j123; (i)++) {
    string s;
    int x;
    cin >> s >> x;
    if (s == "+") {
      if (isOn[x] == 1) {
        cout << "Already on" << '\n';
        continue;
      }
      int conflict = -1;
      for (int(i) = 0, j123 = int(pdivisors[x].size()); (i) < j123; (i)++) {
        int d = pdivisors[x][i];
        if (!A[d].empty()) {
          conflict = *(A[d].begin());
        }
      }
      if (conflict >= 1) {
        cout << "Conflict with " << conflict << '\n';
        continue;
      }
      for (int(i) = 0, j123 = int(pdivisors[x].size()); (i) < j123; (i)++) {
        int d = pdivisors[x][i];
        A[d].insert(x);
      }
      isOn[x] = 1;
      cout << "Success" << '\n';
    } else {
      if (isOn[x] == 0) {
        cout << "Already off" << '\n';
        continue;
      }
      isOn[x] = 0;
      for (int(i) = 0, j123 = int(pdivisors[x].size()); (i) < j123; (i)++) {
        int d = pdivisors[x][i];
        A[d].erase(x);
      }
      cout << "Success" << '\n';
    }
  }
}
