#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
vector<pair<bool, int> > vis;
char ch;
int x;
vector<int> fc;
bool np[100001];
bool wason = 0;
void factorize(int x) {
  for (int i = 2; i * i <= x; ++i) {
    bool yes = false;
    while (x % i == 0) {
      x /= i;
      yes = true;
    }
    if (yes) fc.push_back(i);
  }
  if (x > 1) fc.push_back(x);
  return;
}
int main() {
  int n, m;
  cin >> n >> m;
  vis.resize(n + 1, make_pair(0, 0));
  for (int i = 2; i * i <= 100000; i++) {
    if (np[i] == 0)
      for (int j = i * i; j <= x; j += i) np[j] = 1;
  }
  for (int tt = 0; tt < m; tt++) {
    fc.clear();
    scanf("	%c %d", &ch, &x);
    if (ch == '+') {
      if (x == 1) {
        if (vis[x].first)
          printf("Already on\n");
        else {
          vis[x].first = 1;
          printf("Success\n");
        }
        continue;
      }
      factorize(x);
      bool pr = 0;
      for (int i = 0; i < fc.size(); i++) {
        if (vis[fc[i]].first && vis[fc[i]].second == x) {
          printf("Already on\n");
          pr = 1;
          break;
        } else if (vis[fc[i]].first && vis[fc[i]].second != x) {
          printf("Conflict with %d\n", vis[fc[i]].second);
          pr = 1;
          break;
        }
      }
      if (!pr) {
        for (int i = 0; i < fc.size(); i++) {
          vis[fc[i]].first = 1;
          vis[fc[i]].second = x;
        }
        printf("Success\n");
      }
    } else {
      if (x == 1) {
        if (vis[x].first) {
          printf("Success\n");
          vis[x].first = 0;
        } else
          printf("Already off\n");
        continue;
      }
      factorize(x);
      bool pr = 0;
      for (int i = 0; i < fc.size(); i++) {
        if (vis[fc[i]].first && vis[fc[i]].second != x ||
            vis[fc[i]].first == 0) {
          printf("Already off\n");
          pr = 1;
          break;
        }
      }
      if (!pr) {
        for (int i = 0; i < fc.size(); i++) {
          vis[fc[i]].first = 0;
          vis[fc[i]].second = 0;
        }
        printf("Success\n");
      }
    }
  }
  return 0;
}
