#include <bits/stdc++.h>
using namespace std;
int n, m, bil, konflik;
int flag[110000];
bool bol[110000], valid;
char op;
int main() {
  cin >> n >> m;
  for (int t = 0; t < m; t++) {
    cin >> op >> bil;
    if (op == '+') {
      if (bol[bil]) {
        cout << "Already on" << endl;
        continue;
      }
      valid = true;
      for (int i = 2; i * i <= bil; i++) {
        if (bil % i != 0) continue;
        if (flag[i] != 0) {
          konflik = flag[i];
          valid = false;
          break;
        }
        if (flag[bil / i] != 0) {
          konflik = flag[bil / i];
          valid = false;
          break;
        }
      }
      if (flag[bil] != 0) {
        konflik = flag[bil];
        valid = false;
      }
      if (!valid) {
        cout << "Conflict with " << konflik << endl;
        continue;
      }
      bol[bil] = true;
      for (int i = 2; i * i <= bil; i++) {
        if (bil % i != 0) continue;
        flag[i] = bil;
        flag[bil / i] = bil;
      }
      flag[bil] = bil;
      cout << "Success" << endl;
    }
    if (op == '-') {
      if (!bol[bil]) {
        cout << "Already off" << endl;
        continue;
      }
      bol[bil] = false;
      for (int i = 2; i * i <= bil; i++) {
        if (bil % i != 0) continue;
        flag[i] = 0;
        flag[bil / i] = 0;
      }
      flag[bil] = 0;
      cout << "Success" << endl;
    }
  }
  return 0;
}
