#include <bits/stdc++.h>
using namespace std;
long long spf[1000001];
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 1000001; i++) spf[i] = i;
  for (long long i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<long long> s;
map<long long, long long> m;
void getFactorization(long long x) {
  set<long long> k;
  while (x != 1) {
    k.insert(spf[x]);
    s.insert(spf[x]);
    x = x / spf[x];
  }
  for (auto& i : k) m[i]++;
  return;
}
signed main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  sieve();
  long long c = 1;
  long long flag = 0;
  getFactorization(arr[n - 1]);
  if (n > 1)
    for (long long i = n - 2; i >= 0; i--) {
      flag = 0;
      for (auto& z : s)
        if (arr[i] % z == 0) {
          flag = 1;
          break;
        }
      if (flag == 0) c++;
      getFactorization(arr[i]);
    }
  if (c == n) {
    cout << "pairwise coprime";
    return 0;
  }
  c = 0;
  for (auto i = m.begin(); i != m.end(); i++)
    if (i->second == n) {
      cout << "not coprime";
      return 0;
    }
  cout << "set coprime";
}
