#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    long long tmp = a;
    a = b;
    b = tmp;
  }
  long long r = a % b;
  if (r == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> D(1000001);
  vector<long long> prime(0);
  vector<bool> ans(1000001, false);
  for (int i = 0; i < 1000001; i++) {
    D[i] = i;
  }
  for (int i = 2; i * i < 1000000; i++) {
    if (D[i] == i) {
      for (long long j = i * i; j <= 1000000; j += i) {
        if (D[j] == j) D[j] = i;
      }
    }
  }
  vector<long long> a(n);
  bool pairwise = true;
  long long GCD = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i > 0) GCD = gcd(a[i], a[i - 1]);
    long long A = a[i];
    while (A != 1) {
      if (ans[D[A]]) pairwise = false;
      ans[D[A]] = true;
      long long d = D[A];
      while (A % d == 0) {
        A /= d;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (GCD == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
