#include <bits/stdc++.h>
using namespace std;
const long long INF = 4000000000000000001;
const int inf = 1001001001;
const int MOD = 1000000007;
long long mod_pow(long long N, long long M) {
  if (M == 0) return 1;
  long long res = mod_pow((N * N) % MOD, M / 2);
  if (M & 1) res = (res * N) % MOD;
  return res %= MOD;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
vector<int> multiple(1000005);
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int N;
  cin >> N;
  vector<long long> retu(N);
  for (int i = 0; i < N; i++) {
    cin >> retu.at(i);
    multiple.at(retu.at(i))++;
  }
  for (int i = 2; i <= 1000000; i++) {
    int multipleCount = 0;
    int now = i;
    while (true) {
      if (now > 1000000) break;
      multipleCount += multiple.at(now);
      now += i;
    }
    if (multipleCount == N) {
      cout << "not coprime"
           << "\n";
      ;
      return 0;
    }
    if (multipleCount > 1) {
      cout << "setwise coprime"
           << "\n";
      ;
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
  ;
}
