#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000;
long long int mod = 1e9 + 7;
int d[maxn + 1];
int n;
int a[maxn];
int cnt[maxn + 1];
int used[maxn + 1];
int ans = 0;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i <= maxn; i++) d[i] = 1e9 + 7;
  d[0] = d[1] = 1;
  sort(a, a + n);
  for (int div = 2; div <= a[n - 1]; div++) {
    for (int bediv = 2; bediv <= a[n - 1]; bediv++) {
      if (d[bediv] == 1e9 + 7) {
        if (bediv % div == 0) {
          d[bediv] = div;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    int bediv = a[i];
    set<int> s;
    while (bediv > 1) {
      s.insert(d[bediv]);
      bediv = bediv / d[bediv];
    }
    for (auto ite = s.begin(); ite != s.end(); ite++) {
      used[*ite]++;
      if (used[*ite] > 1) {
        ans = 1;
        break;
      }
    }
    if (ans == 1) break;
  }
  set<int> t;
  int temp = a[0];
  while (temp > 1) {
    t.insert(d[temp]);
    temp = temp / d[temp];
  }
  for (auto ite = t.begin(); ite != t.end(); ite++) {
    for (int i = 0; i < n; i++) {
      if (a[i] % *ite != 0) break;
      if (i == n - 1) ans = 2;
    }
    if (ans == 2) break;
  }
  if (ans == 0) {
    cout << "pairwise coprime" << endl;
  } else if (ans == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
