#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100010;
int n, m;
char active[MAX_N];
int mark[MAX_N];
vector<int> GetPrimeFactors(int number) {
  vector<int> result;
  for (int i = 2; i * i <= number; ++i) {
    if (number % i == 0) {
      result.push_back(i);
      while (number % i == 0) {
        number /= i;
      }
    }
  }
  if (number > 1) {
    result.push_back(number);
  }
  return result;
}
int TestConflict(vector<int> prime_factors) {
  int result = 0;
  for (size_t i = 0; i < prime_factors.size(); ++i) {
    result = max(result, mark[prime_factors[i]]);
  }
  return result;
}
void MapFactors(vector<int> prime_factors, int marker) {
  for (size_t i = 0; i < prime_factors.size(); ++i) {
    mark[prime_factors[i]] = marker;
  }
}
int main() {
  scanf("%d %d ", &n, &m);
  for (int i = 1; i <= m; ++i) {
    char sign;
    int number;
    scanf("%c %d ", &sign, &number);
    if (sign == '+') {
      if (active[number]) {
        printf("Already on\n");
      } else {
        vector<int> prime_factors = GetPrimeFactors(number);
        int conflict = TestConflict(prime_factors);
        if (conflict > 0) {
          printf("Conflict with %d\n", conflict);
        } else {
          printf("Success\n");
          active[number] = 1;
          MapFactors(prime_factors, number);
        }
      }
    } else {
      if (active[number] == 0) {
        printf("Already off\n");
      } else {
        printf("Success\n");
        active[number] = 0;
        vector<int> prime_factors = GetPrimeFactors(number);
        MapFactors(prime_factors, 0);
      }
    }
  }
  return 0;
}
