#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
vector<long long> cnt;
vector<bool> prime(N, true);
long long a[N] = {};
void init() {
  prime[1] = false;
  for (long long i = 2; i * i < N; ++i) {
    if (prime[i]) {
      for (long long j = i * i; j < N; j += i) {
        prime[j] = false;
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  init();
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    if (x % 2 == 0) a[2]++;
    while (x % 2 == 0) x /= 2;
    for (long long i = 3; i * i <= x; i += 2) {
      if (x % i == 0) {
        a[i]++;
        while (x % i == 0) {
          x /= i;
        }
      }
    }
  }
  long long cnt = 0;
  bool pairwise = true, setwise = true;
  for (long long i = 2; i < N; ++i) {
    if (prime[i]) {
      if (a[i] > 1) pairwise = false;
      if (a[i] == n) {
        setwise = false;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime";
  } else if (setwise) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
