#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000001;
int N, primeCount;
bool isPrime[MAX_N];
set<int> sa;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void sieve() {
  for (int i = 2; i < MAX_N; ++i) isPrime[i] = 1;
  for (int i = 2; i * i < MAX_N; ++i) {
    if (!isPrime[i]) continue;
    for (int j = i; i * j < MAX_N; ++j) {
      isPrime[i * j] = 0;
    }
  }
  for (int i = 2; i < MAX_N; ++i) {
    if (isPrime[i]) ++primeCount;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  cin >> N;
  int all = 0;
  bool unique = 1;
  for (int i = 0; i < N; ++i) {
    int num;
    cin >> num;
    all = gcd(all, num);
    if (num > 1 && sa.find(num) != sa.end()) unique = 0;
    sa.insert(num);
  }
  if (all != 1) {
    cout << "not coprime\n";
  } else {
    set<int> pfactors;
    pfactors.clear();
    for (int a : sa) {
      if (isPrime[a]) {
        if (pfactors.find(a) != pfactors.end()) {
          cout << "setwise coprime\n";
          return 0;
        }
        pfactors.insert(a);
      } else {
        for (int j = 2; j * j <= a; ++j) {
          if (isPrime[j] && a % j == 0) {
            if (pfactors.find(j) != pfactors.end()) {
              cout << "setwise coprime\n";
              return 0;
            }
            pfactors.insert(j);
          }
        }
      }
    }
    cout << "pairwise coprime\n";
  }
  return 0;
}
