#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long n, g = 0, cnt[100005] = {};
  cin >> n;
  for (long long i = 0; i < (n); i++) {
    long long a;
    cin >> a;
    cnt[a]++;
    g = gcd(g, a);
  }
  bool ok = true;
  for (long long i = 2; i < 100005; i++) {
    long long sum = 0;
    for (long long j = i; j < 100005; j += i) sum += cnt[j];
    if (sum > 1) ok = false;
  }
  cout << (ok       ? "pairwise coprime"
           : g == 1 ? "setwise coprime"
                    : "not coprime")
       << endl;
  return 0;
}
