#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-8;
const long long MOD = 1000000007;
const int N = 100000 + 7;
int n, m, ind;
char t;
vector<set<int>> pfCnt(1e5 + 9);
vector<int> onOf(1e5 + 9);
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    scanf(" %c %d", &t, &ind);
    int temp = ind;
    if (t == '+' && onOf[ind] == 1)
      printf("Already on\n");
    else if (t == '-' && onOf[ind] == 0)
      printf("Already off\n");
    else if (t == '-') {
      printf("Success\n");
      onOf[ind] = 0;
      int i = 2;
      for (; i * i <= ind; i++)
        if (ind % i == 0) {
          pfCnt[i].erase(temp);
          while (ind % i == 0) {
            ind /= i;
          }
        }
      if (ind != 1) pfCnt[ind].erase(temp);
    } else {
      int i = 2;
      bool isok = true;
      int conf = 0;
      for (; i * i <= ind && isok; i++)
        while (ind % i == 0) {
          ind /= i;
          if (pfCnt[i].size()) isok = false, conf = *(pfCnt[i].begin());
        }
      if (ind != 1)
        if (pfCnt[ind].size()) isok = false, conf = *(pfCnt[ind].begin());
      if (!isok)
        printf("Conflict with %d\n", conf);
      else {
        i = 2, ind = temp;
        onOf[temp] = 1;
        for (; i * i <= ind; i++)
          while (ind % i == 0) {
            ind /= i;
            pfCnt[i].insert(temp);
          }
        if (ind != 1) pfCnt[ind].insert(temp);
        printf("Success\n");
      }
    }
  }
  return 0;
}
