#include <bits/stdc++.h>
using namespace std;
vector<int> prime(1000006, 1);
vector<int> fact(1000006, 0);
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void sieve() {
  for (int i = 2; i < 1000006; i++) {
    if (prime[i]) {
      fact[i] = i;
    } else
      continue;
    long long j = i + i;
    while (j < 1000006 && prime[j]) {
      prime[j] = 0;
      fact[j] = i;
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  set<int> ss;
  sieve();
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int flag = 1;
  int g = a[0];
  for (int i = 0; i < n; i++) {
    if (i > 0) g = gcd(g, a[i]);
    int now = a[i];
    while (flag && now > 1) {
      int f = fact[now];
      while (now % f == 0) now /= f;
      if (ss.find(f) != ss.end()) {
        flag = 0;
        break;
      }
      ss.insert(f);
    }
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
