#include <bits/stdc++.h>
using namespace std;
vector<bool> isprime(1000000 + 1, true);
vector<long long int> primes;
int v[1000000 + 1] = {0};
void seive() {
  int i, j;
  isprime[0] = false;
  isprime[1] = false;
  for (i = 2; (i * i) <= 1000000; i++) {
    if (isprime[i]) {
      primes.push_back(i);
      for (j = i * i; j <= 1000000; j += i) {
        isprime[j] = false;
      }
    }
  }
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, flag = 0, flag1 = 0;
  cin >> n;
  seive();
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int k = 0, pf = primes[k];
    while (pf * pf <= a[i]) {
      if (a[i] % pf == 0) {
        v[pf]++;
        while (a[i] % pf == 0) {
          a[i] /= pf;
        }
      }
      pf = primes[++k];
    }
    if (a[i] != 1) {
      v[a[i]]++;
    }
  }
  for (int i = 0; i <= 1000000; i++) {
    if (v[i] == n) {
      flag1++;
      break;
    } else if (v[i] > 1) {
      flag++;
    }
  }
  if (flag1 == 0) {
    if (flag > 1) {
      cout << "setwise coprime";
    } else {
      cout << "pairwise coprime";
    }
  } else {
    cout << "not coprime";
  }
  return 0;
}
