#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
map<int, int> mp;
int a[N];
int main() {
  int n, m, x;
  char c;
  scanf("%d%d", &n, &m);
  mp.clear();
  while (m--) {
    scanf(" %c", &c);
    scanf("%d", &x);
    if (c == '+') {
      if (a[x] == 1)
        puts("Already on");
      else {
        int flag = 0;
        for (int i = 2; i <= sqrt(x); i++) {
          if (x % i == 0) {
            if (mp[i] > 0) {
              flag = mp[i];
              break;
            }
            if (mp[x / i] > 0) {
              flag = mp[x / i];
              break;
            }
          }
        }
        if (mp[x] > 0) {
          flag = mp[x];
        }
        if (flag == 0) {
          puts("Success");
          a[x] = 1;
          for (int i = 2; i <= sqrt(x); i++) {
            if (x % i == 0) {
              mp[i] = mp[x / i] = x;
            }
          }
          mp[x] = x;
        } else {
          printf("Conflict with %d\n", flag);
        }
      }
    } else if (c == '-') {
      if (a[x] == 0)
        puts("Already off");
      else {
        puts("Success");
        a[x] = 0;
        for (int i = 2; i <= sqrt(x); i++) {
          if (x % i == 0) {
            mp[i] = mp[x / i] = 0;
          }
        }
        mp[x] = 0;
      }
    }
  }
  return 0;
}
