#include <bits/stdc++.h>
using namespace std;
vector<int> divs[200005];
int vis[200005];
bool added[2000005];
int main() {
  for (int i = 2; i < 100005; i++) {
    for (int j = i; j < 100005; j += i) {
      divs[j].push_back(i);
    }
  }
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < q; i++) {
    char type;
    int num;
    scanf(" %c%d", &type, &num);
    if (type == '+') {
      if (added[num]) {
        puts("Already on");
      } else {
        int conflict = 0;
        for (auto d : divs[num]) {
          if (vis[d]) {
            conflict = vis[d];
            break;
          }
        }
        if (conflict) {
          printf("Conflict with %d\n", conflict);
        } else {
          for (auto d : divs[num]) {
            vis[d] = num;
          }
          added[num] = true;
          puts("Success");
        }
      }
    }
    if (type == '-') {
      if (!added[num]) {
        puts("Already off");
      } else {
        for (auto d : divs[num]) {
          vis[d] = 0;
        }
        puts("Success");
        added[num] = false;
      }
    }
  }
}
