#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long r = a % b;
  while (r > 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
vector<bool> prime(1111111, true);
void make_prime() {
  prime[0] = prime[1] = false;
  for (long long i = 0; i < 1111111; i++) {
    if (prime[i] == false) continue;
    for (long long j = 2 * i; j < 1111111; j += i) {
      prime[j] = false;
    }
  }
}
long long cnt[1111111] = {};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> A(n);
  long long g = 0;
  make_prime();
  vector<long long> pri;
  bool fl = true;
  for (int i = 2; i <= sqrt(1111111); i++)
    if (prime[i]) pri.push_back(i);
  for (auto &a : A) {
    cin >> a;
    if (g == 0)
      g = a;
    else
      g = gcd(g, a);
    for (auto p : pri) {
      if (a % p == 0) {
        cnt[p]++;
        if (cnt[p] == 2) {
          fl = false;
        }
      }
    }
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (fl)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
