#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<int> prime;
int minfactor[1000010];
void linear_prime(int n) {
  for (int i = 2; i <= n; i++) {
    if (!minfactor[i]) prime.push_back(i);
    for (auto j : prime) {
      if (i * j > n) break;
      minfactor[i * j] = j;
      if (i % j == 0) break;
    }
  }
}
int N, d[1000010];
bool chk[1000010];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  linear_prime(1000000);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> d[i];
  bool flag = 1;
  for (int i = 0; i < N; i++) {
    int x = d[i];
    vector<int> t;
    while (minfactor[x]) {
      t.push_back(minfactor[x]);
      x /= minfactor[x];
      if (chk[x]) flag = 0;
    }
    t.push_back(x);
    for (auto i : t) chk[i] = 1;
  }
  if (flag) {
    cout << "pairwise coprime";
    return 0;
  }
  int x = d[0];
  for (int i = 1; i < N; i++) x = gcd(x, d[i]);
  if (x == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
