#include <bits/stdc++.h>
using namespace std;
const long long infl = 1e18 + 5;
long long int n, m, k, q, x, y, f, val, t = 1, i, j;
long long int ind = -1, cnt, sz, sm, ans, mx = -1, mn = infl;
long long int a[1000004], b[1000004];
int turn(long long int x, int val) {
  long long int cx = x;
  if (val == 1) {
    for (int j = 2; j * j <= x; j++) {
      if (x % j == 0 && a[j] > 0) return a[j];
      while (x > 1 && x % j == 0) {
        x /= j;
      }
    }
    if (x > 1 && a[x] > 0) return a[x];
    x = cx;
  }
  for (int j = 2; j * j <= x; j++) {
    while (x > 1 && x % j == 0) {
      x /= j;
      if (val == -1)
        a[j] = 0;
      else
        a[j] = cx;
    }
  }
  if (x > 1) {
    if (val == 1)
      a[x] = cx;
    else
      a[x] = 0;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("inp.txt", "r")) {
    freopen("myfile.txt", "w", stdout);
    freopen("inp.txt", "r", stdin);
  }
  cin >> n >> m;
  char ch;
  for (i = 0; i < m; i++) {
    cin >> ch >> x;
    if (ch == '+') {
      if (b[x] == 1) {
        cout << "Already on\n";
      } else {
        long long int re = turn(x, 1);
        if (re != 0) {
          cout << "Conflict with " << re << "\n";
        } else {
          b[x] = 1;
          cout << "Success\n";
        }
      }
    } else {
      if (b[x] == 0) {
        cout << "Already off\n";
      } else {
        b[x] = 0;
        cout << "Success\n";
        turn(x, -1);
      }
    }
  }
  return 0;
}
