#include <bits/stdc++.h>
using namespace std;
int Arr[200001], size1[200001];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  int a[n];
  cin >> a[0];
  int i, j, k, gcdo = a[0];
  unordered_map<int, int> mp;
  mp[a[0]]++;
  for (i = 1; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
    gcdo = gcd(gcdo, a[i]);
  }
  if (gcdo > 1) {
    cout << "not coprime";
  } else {
    int prime[1000001] = {0}, flag = 0, flag1 = 0;
    for (i = 2; i * i < 1000001; i++) {
      if (!prime[i]) {
        for (j = i; j < 1000001; j += i) {
          if (mp[j] > 1) {
            flag = mp[j];
          }
          prime[j] = 1;
        }
        if (flag > 1) flag1 = 1;
        flag = 0;
      }
    }
    if (flag1 == 1) {
      cout << "setwise coprime";
    } else
      cout << "pairwise coprime";
  }
}
