#include <bits/stdc++.h>
using namespace std;
bool is_prime(long long n) {
  if (n <= 1) return false;
  long long cnt = 0;
  for (long long i = (2); (i * i <= n); (++i)) cnt += !(n % i);
  return !cnt;
}
vector<long long> z_func(vector<long long>& v) {
  long long n = v.size();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && v[z[i]] == v[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
vector<long long> prefix_func(vector<long long>& v) {
  long long n = v.size();
  vector<long long> pf(n, 0);
  for (long long i = 0; i < n; ++i) {
    long long j = pf[i - 1];
    while (j > 0 && v[i] != v[j]) j = pf[j - 1];
    if (v[i] == v[j]) ++j;
    pf[i] = j;
  }
  return pf;
}
long long modulo_power(long long a, long long p, long long m) {
  long long x = 1;
  long long y = a;
  while (p > 0) {
    if (p & 1) x = (x * y) % m;
    y = (y * y) % m;
    p >>= 1;
  }
  return x % m;
}
long long modulo_mult(long long a, long long b, long long m) {
  if (!a || !b) return 0;
  if (a & 1) return (b + modulo_mult(a - 1, b, m)) % m;
  return (modulo_mult(a / 2, b, m) * 2) % m;
}
long long euler_func(long long n) {
  long long result = n;
  for (long long i = (2); (i * i <= n); (++i)) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
vector<pair<long long, long long> > prime_divisors_extended(long long number) {
  vector<pair<long long, long long> > divisors;
  if (number % 2 == 0) {
    long long cnt = 0;
    while (number % 2 == 0) {
      number /= 2;
      ++cnt;
    }
    if (cnt) divisors.push_back({2, cnt});
  }
  long long start_number = number;
  for (long long p = 3; p <= number && p * p <= start_number; p += 2) {
    long long cnt = 0;
    while (number % p == 0) {
      number /= p;
      ++cnt;
    }
    if (cnt) divisors.push_back({p, cnt});
  }
  if (number != 1) divisors.push_back({number, 1});
  return divisors;
}
vector<long long> prime_divisors(long long number) {
  vector<long long> divisors;
  if (number % 2 == 0) {
    divisors.push_back(2);
    while (!(number % 2)) number /= 2;
  }
  long long start_number = number;
  for (long long p = 3; p <= number && p * p <= start_number; p += 2) {
    if (number % p) continue;
    divisors.push_back(p);
    while (!(number % p)) number /= p;
  }
  if (number - 1) divisors.push_back(number);
  return divisors;
}
vector<long long> all_divisors(long long number) {
  vector<long long> divisors;
  for (long long p = 1; p * p <= number; p++) {
    long long t = p;
    if (number % t == 0) {
      divisors.push_back(p);
      if (p * p != number) {
        divisors.push_back(number / p);
      }
    }
  }
  return divisors;
}
long long gcd(long long a, long long b) {
  if (!(a || b)) return 1;
  return (b ? gcd(b, a % b) : a);
}
long long gcd_coef(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd_coef(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
long long combinations(long long n, long long k) {
  return (k && n - k) ? combinations(n - 1, k) + combinations(n - 1, k - 1) : 1;
}
bool is_prime_Fermat(long long number, long long iterations) {
  if (number <= 1 || number == 4) return false;
  if (number <= 3) return true;
  while (iterations--) {
    long long a = 1 + rand() % (number - 1);
    if (gcd(number, a) != 1) return false;
    if (modulo_power(a, number - 1, number) != 1) return false;
  }
  return true;
}
vector<long long> eratosthenes_sieve(long long n) {
  n++;
  vector<bool> isprime(n, true);
  vector<long long> primes(0);
  vector<long long> spf(n);
  isprime[0] = isprime[1] = false;
  for (long long i = (2); (i < n); (++i)) {
    if (isprime[i]) {
      primes.push_back(i);
      spf[i] = i;
    }
    for (long long j = (0);
         (j < primes.size() && i * primes[j] < n && primes[j] <= spf[i]);
         (++j)) {
      isprime[i * primes[j]] = false;
      spf[i * primes[j]] = primes[j];
    }
  }
  return primes;
}
const long double ZERO = 1e-15;
const long double EPS = 1e-10;
const long long N = 100500;
const long long MOD = 1000000007;
const long long INF9 = 2 * 1e9;
const long long INF = 2 * 1e18;
void solvev(long long n, vector<long long>& v) {}
long long modulo_inverted_element(long long a, long long m) {
  long long x, y;
  long long g = gcd_coef(a, m, x, y);
  if (g != 1)
    return -1;
  else
    return (x % m + m) % m;
  ;
}
const long long alp = 27;
long long n, m;
long long t[N];
long long h[N];
long long cur[N];
void prep() {
  cin >> n >> m;
  for (long long i = (2); (i <= n); (++i))
    if (!t[i])
      for (long long j = (i); (j <= n); (j += i)) t[j] = i;
}
long long check(long long x, long long type) {
  long long mask = x;
  while (x > 1) {
    if (type == 0 && cur[t[x]]) return cur[t[x]];
    if (type == 1) cur[t[x]] = mask;
    if (type == 2) cur[t[x]] = 0;
    x /= t[x];
  }
  return -1;
}
void solve() {
  prep();
  while (m--) {
    char ch;
    long long x;
    cin >> ch >> x;
    if (ch == '+') {
      long long ans = check(x, 0);
      if (h[x]) {
        cout << "Already on" << endl;
        continue;
      }
      if (ans != -1) {
        cout << "Conflict with " << ans << endl;
        continue;
      }
      cout << "Success" << endl;
      check(x, 1);
      h[x] = 1;
      continue;
    }
    if (!h[x]) {
      cout << "Already off" << endl;
      continue;
    }
    cout << "Success" << endl;
    check(x, 2);
    h[x] = 0;
  }
}
signed main() {
  ios::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
