#include <bits/stdc++.h>
using namespace std;
vector<int> primefacts[100010];
bool ison[100010];
int whichnumber[100010];
int main() {
  for (int i = 1; i <= 100000; i++) {
    int tmp = i;
    for (int j = 2; j * j <= tmp; j++) {
      if (tmp % j == 0) {
        primefacts[i].push_back(j);
        while (tmp % j == 0) tmp /= j;
      }
    }
    if (tmp > 1) primefacts[i].push_back(tmp);
    ison[i] = false;
    whichnumber[i] = -1;
  }
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    string order;
    int number;
    cin >> order >> number;
    if (order == "+") {
      if (ison[number]) {
        printf("Already on\n");
        continue;
      }
      bool ok = true;
      int conflict = -1;
      for (int j = 0; j < primefacts[number].size(); j++) {
        if (whichnumber[primefacts[number][j]] != -1) {
          ok = false;
          conflict = whichnumber[primefacts[number][j]];
        }
      }
      if (ok) {
        printf("Success\n");
        for (int j = 0; j < primefacts[number].size(); j++)
          whichnumber[primefacts[number][j]] = number;
        ison[number] = true;
      } else
        printf("Conflict with %d\n", conflict);
    } else {
      if (!ison[number])
        printf("Already off\n");
      else {
        for (int j = 0; j < primefacts[number].size(); j++)
          whichnumber[primefacts[number][j]] = -1;
        printf("Success\n");
        ison[number] = false;
      }
    }
  }
}
