#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int a[maxn];
int ans;
int gcd_(int aa, int bb) {
  int a = aa;
  int b = bb;
  int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return a;
}
void solve() {
  int N;
  cin >> N;
  int flag = 0;
  int flag2 = 0;
  int min_ = 1e9 + 5;
  int mindex;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    if (a[i] != 1 && a[i] < min_) {
      min_ = a[i];
      mindex = i;
    }
  }
  if (min_ == 1e9 + 5) {
    cout << "pairwise coprime";
    return;
  }
  int bns = 0;
  while (bns < N - 1) {
    bns = 0;
    int minn = 1e9 + 5;
    int index;
    for (int i = 1; i <= N; i++) {
      if (i == mindex) continue;
      if (a[i] == 1 || a[i] == 0) {
        if (a[i] != 1)
          flag = 1;
        else
          flag2 = 1;
        bns++;
        continue;
      }
      a[i] = gcd_(a[i], min_);
      if (a[i] != 1 && a[i] != 0 && a[i] < minn) {
        minn = a[i];
        index = i;
      }
    }
    if (bns >= N - 1) break;
    if (minn == 1e9 + 5) {
      continue;
    }
    min_ = minn;
    mindex = index;
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else if (flag2 == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
int main() {
  int _ = 1;
  while (_--) {
    solve();
  }
  return 0;
}
