#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
bool prime[1000001];
void SieveOfEratosthenes(int n) {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void f(int x, int s[]) {
  set<int> ret;
  while (x != 1) {
    if (ret.find(spf[x]) == ret.end())
      ;
    {
      ret.insert(spf[x]);
      s[spf[x]]++;
    }
    x = x / spf[x];
  }
}
int main() {
  int t = 1;
  SieveOfEratosthenes(1000000);
  sieve();
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int s[1000001] = {0};
    for (int i = 0; i < n; i++) f(a[i], s);
    int flag1 = 0;
    int flag2 = 0;
    for (int i = 1; i <= 1000000; i++) {
      if (prime[i]) {
        if (s[i] == n) {
          flag1++;
          break;
        } else if (s[i] > 1 && s[i] < n) {
          flag2++;
        }
      }
    }
    if (flag1 == 0 && flag2 == 0)
      cout << "pairwise coprime";
    else if (flag1 > 0)
      cout << "not coprime";
    else
      cout << "setwise coprime";
  }
  return 0;
}
