#include <bits/stdc++.h>
using namespace std;
void sieve(vector<int> &spf) {
  for (int i = 2; i * i <= spf.size(); i++) {
    if (spf[i] == -1) {
      for (int j = i; i * j <= spf.size(); j++) {
        if (spf[i * j] == -1) spf[i * j] = i;
      }
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> spf(n + 1, -1), state(n + 1, 0);
  sieve(spf);
  unordered_map<int, int> umap;
  while (m--) {
    char sign;
    int num;
    cin >> sign >> num;
    if (sign == '+') {
      if (state[num] == 1) {
        cout << "Already on";
      } else if (spf[num] != -1) {
        int temp = num, flag = 1;
        while (spf[num] != -1) {
          if (umap[spf[num]] != 0) {
            num = umap[spf[num]];
            flag = 0;
            break;
          }
          num = num / spf[num];
        }
        if (umap[num] != 0) {
          num = umap[num];
          flag = 0;
        }
        if (flag == 1) num = temp;
        while (flag == 1 && spf[num] != -1) {
          umap[spf[num]] = temp;
          num = num / spf[num];
        }
        if (num != 1 && flag == 1) {
          umap[num] = temp;
        }
        if (flag == 1) {
          state[temp] = 1;
          cout << "Success";
        } else {
          cout << "Conflict with " << num;
        }
      } else if (spf[num] == -1 && umap[num] == 0) {
        umap[num] = num;
        state[num] = 1;
        cout << "Success";
      } else if (spf[num] == -1 && umap[num] != 0) {
        cout << "Conflict with " << umap[num];
      }
    } else {
      if (state[num] == 0) {
        cout << "Already off";
      } else if (spf[num] != -1) {
        state[num] = 0;
        while (spf[num] != -1) {
          umap[spf[num]] = 0;
          num = num / spf[num];
        }
        if (num != 1) {
          umap[num] = 0;
        }
        cout << "Success";
      } else if (spf[num] == -1) {
        umap[num] = 0;
        state[num] = 0;
        cout << "Success";
      }
    }
    cout << endl;
  }
}
