#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
int n;
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int g = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    g = gcd(g, a);
    int ta = a;
    for (int j = 2; j * j <= ta; j++) {
      if (a % j) continue;
      mp[j]++;
      while (a % j == 0) a /= j;
    }
    if (a != 1) mp[a]++;
  }
  if (g != 1) {
    cout << "not coprime";
  } else {
    bool flag = 0;
    for (auto it : mp) {
      if (it.second > 1) flag = 1;
    }
    if (flag)
      cout << "setwise coprime";
    else
      cout << "pairwise coprime";
  }
}
