#include <bits/stdc++.h>
using namespace std;
int f[(int)(1e5 + 1)];
bool vis[(int)(1e5 + 1)];
int add(int n) {
  if (n == 1) {
    return 0;
  }
  vector<int> v;
  int temp = n;
  if (n % 2 == 0) {
    if (f[2]) return f[2];
    while (n % 2 == 0) n /= 2;
    v.push_back(2);
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      if (f[i]) return f[i];
      while (n % i == 0) n /= i;
      v.push_back(i);
    }
  }
  if (n > 2) {
    if (f[n]) return f[n];
    v.push_back(n);
  }
  for (auto i : v) f[i] = temp;
  return 0;
}
int sub(int n) {
  if (n == 1) {
    return 0;
  }
  int temp = n;
  if (n % 2 == 0) {
    while (n % 2 == 0) n /= 2;
    f[2] -= temp;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      f[i] -= temp;
    }
  }
  if (n > 2) {
    f[n] -= temp;
  }
  return 0;
}
int main() {
  memset(f, 0, sizeof(f));
  memset(vis, 0, sizeof(vis));
  int n, m, i;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    char c;
    int u;
    cin >> c >> u;
    if (c == '+') {
      if (vis[u])
        cout << "Already on" << '\n';
      else {
        int temp = add(u);
        if (!temp) {
          vis[u] = 1;
          cout << "Success" << '\n';
        } else {
          cout << "Conflict with " << temp << '\n';
        }
      }
    } else {
      if (!vis[u])
        cout << "Already off" << '\n';
      else {
        sub(u);
        cout << "Success" << '\n';
        vis[u] = 0;
      }
    }
  }
}
