#include <bits/stdc++.h>
using namespace std;
int arr[100000 + 1];
int divisors[100000 + 1];
map<int, vector<int> > mp;
pair<bool, int> check_divisors(int n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      if (divisors[i] && i != 1) {
        vector<int> v;
        v = mp[i];
        return make_pair(true, v[0]);
      }
      if (divisors[n / i]) {
        vector<int> v;
        v = mp[n / i];
        return make_pair(true, v[0]);
      }
    }
  }
  return make_pair(false, -1);
}
void add_divisors(int n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      if (i != 1) {
        divisors[i]++;
        mp[i].push_back(n);
      }
      divisors[n / i]++;
      mp[n / i].push_back(n);
    }
  }
}
void remove_divisors(int n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      vector<int> v;
      if (i != 1) {
        divisors[i]--;
        v = mp[i];
        int d1 = lower_bound(v.begin(), v.end(), n) - v.begin();
        mp[i].erase(mp[i].begin() + d1);
      }
      divisors[n / i]--;
      v = mp[n / i];
      int d2 = lower_bound(v.begin(), v.end(), n) - v.begin();
      mp[n / i].erase(mp[n / i].begin() + d2);
    }
  }
}
int main() {
  int n, m, i;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    char c;
    int a;
    cin >> c >> a;
    if (c == '+') {
      if (arr[a])
        cout << "Already on\n";
      else {
        pair<bool, int> res;
        res = check_divisors(a);
        if (res.first) {
          cout << "Conflict with " << res.second << endl;
        } else {
          arr[a]++;
          cout << "Success\n";
          add_divisors(a);
        }
      }
    } else {
      if (!arr[a])
        cout << "Already off\n";
      else {
        arr[a]--;
        cout << "Success\n";
        remove_divisors(a);
      }
    }
  }
  return 0;
}
