#include <bits/stdc++.h>
using namespace std;
vector<long> fac(10000000);
vector<long> finv(10000000);
vector<long> inv(10000000);
void Cominit() {
  fac.at(0) = fac.at(1) = 1;
  finv.at(0) = finv.at(1) = 1;
  inv.at(1) = 1;
  for (long i = 2; i < 10000000; i++) {
    fac.at(i) = (fac.at(i - 1) * i) % 1000000007;
    inv.at(i) =
        1000000007 - inv.at(1000000007 % i) * (1000000007 / i) % 1000000007;
    finv.at(i) = finv.at(i - 1) * inv.at(i) % 1000000007;
  }
}
long facComb(long N, long M) {
  if (N < M) return 0;
  if (N < 0 || M < 0) return 0;
  return fac.at(N) * (finv.at(M) * finv.at(N - M) % 1000000007) % 1000000007;
}
long Comb(long N, long M) {
  long ans = 1;
  for (long i = N; i > N - M; i--) {
    ans = ans * i;
  }
  for (long i = M; i > 0; i--) {
    ans = ans / i;
  }
  return ans;
}
long Perm(long N, long M) {
  long ans = 1;
  for (long i = N; i > N - M; i--) {
    ans = ans * i;
  }
  return ans;
}
long GCM(long A, long B) {
  long W, r;
  if (A < B) {
    W = B;
    B = A;
    A = W;
  }
  while (A % B != 0) {
    r = A % B;
    A = B;
    B = r;
  }
  return B;
}
long LCM(long A, long B) { return (A * B) / GCM(A, B); }
long upDiv(long a, long b) { return (a + b - 1) / b; }
int main() {
  long N, max = 0;
  cin >> N;
  vector<long> A(N);
  vector<long> B(N);
  vector<long> C;
  long PR = 1000002;
  vector<long> P(PR, 0);
  vector<long> R;
  for (long i = 2; i * i < PR; i++) {
    if (P.at(i) == 0) {
      long j = i;
      j += i;
      while (j < PR) {
        P.at(j) = 1;
        j += i;
      }
    }
  }
  for (long i = 2; i < PR; i++) {
    if (P.at(i) == 0) {
      R.push_back(i);
    }
  }
  for (long i = 0; i < N; i++) {
    cin >> A.at(i);
    B.at(i) = A.at(i);
    if (max < A.at(i)) {
      max = A.at(i);
    }
  }
  vector<long> X(max + 1, 0);
  for (long i = 0; i < N; i++) {
    long j = 0;
    long flag = 0;
    while (B.at(i) > 1) {
      if (B.at(i) % R.at(j) == 0) {
        if (flag == 0) {
          X.at(j)++;
        }
        B.at(i) = B.at(i) / R.at(j);
        flag = 1;
      } else {
        j++;
        flag = 0;
      }
    }
  }
  long t = 1;
  for (long i = 0; i < max + 1; i++) {
    if (X.at(i) > 1) {
      t = 0;
      break;
    }
  }
  sort(A.begin(), A.end());
  long mark = 0;
  long j = 2;
  while (A.at(0) > 1) {
    if (A.at(0) % j == 0) {
      if (mark == 0) {
        C.push_back(j);
      }
      A.at(0) = A.at(0) / j;
      mark = 1;
    } else {
      j++;
      mark = 0;
    }
  }
  for (long i = 1; i < N; i++) {
    for (long k = 0; k < C.size(); k++) {
      if (!(A.at(i) % C.at(k) == 0)) {
        auto itr = next(C.begin(), k);
        C.erase(itr);
      }
    }
  }
  long s = 0;
  if (C.size() == 0) {
    s = 1;
  }
  if (s == 1 & t == 1) {
    cout << "pairwise coprime" << endl;
  } else if (s == 1 && t == 0) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
