#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int n = 1000000;
void eratosthenes(vector<int> &prime) {
  for (int i = 0; i < (int)(n); i++) prime.at(i) = 1;
  prime.at(0) = prime.at(1) = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (prime.at(i)) {
      for (int j = i + i; j < n; j += i) {
        prime.at(j) = 0;
      }
    }
  }
}
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  }
  return gcd(b, a % b);
}
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> A.at(i);
  }
  sort(A.begin(), A.end());
  vector<int> prime(1000000);
  eratosthenes(prime);
  vector<long long> value;
  for (int i = 0; i < (int)(1000000); i++) {
    if (prime.at(i) == 1) {
      value.push_back(i);
    }
  }
  vector<long long> memo(1000010, 0);
  long long flag1 = 1;
  long long flag2 = 0;
  long long a_gcd = A.at(0);
  for (int i = 0; i < (int)(N); i++) {
    long long a = A.at(i);
    for (auto v : value) {
      if (a % v == 0) {
        if (memo.at(v) != 0) {
          flag1 = 0;
        }
        memo.at(v) = 1;
        a /= v;
        if (flag1 == 0) {
          break;
        }
      }
    }
    a_gcd = gcd(a_gcd, A.at(i));
  }
  if (a_gcd == 1) {
    flag2 = 1;
  }
  if (flag1 == 1) {
    cout << "pairwise coprime" << endl;
  } else if (flag2 == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
