#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int INFLL = 0x3f3f3f3f3f3f3f3f;
const int maxn = 1e6 + 10;
int a[maxn];
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
bool np[maxn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> a[i];
  int t = a[1];
  bool f = true;
  for (int i = (2); i <= (n); i++) {
    int g = gcd(t, a[i]);
    if (g != 1) {
      f = false;
    }
    t = g;
  }
  sort(a + 1, a + 1 + n);
  int maxx = *max_element(a + 1, a + 1 + n);
  for (int i = (1); i <= (n); i++) {
    if (np[a[i]] || a[i] == a[i - 1]) {
      f = false;
      break;
    }
    int pro = 2;
    while (pro * a[i] <= maxx) {
      np[pro * a[i]] = 1;
      pro++;
    }
  }
  if (t != 1)
    cout << "not coprime";
  else if (f)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
