#include <bits/stdc++.h>
using namespace std;
int flag = 0;
vector<int> v;
int gcd(int x, int y) {
  int a, b;
  a = x;
  b = y;
  int wk;
  if (x < y) {
    wk = x;
    x = y;
    y = wk;
  }
  while (y) {
    wk = x % y;
    x = y;
    y = wk;
  }
  if (x != 1) {
    v.push_back(a);
    v.push_back(b);
    flag = 1;
  }
  return x;
}
int gcd_a(int n, int* a) {
  if (n == 1) return a[0];
  if (n == 2) return gcd(a[0], a[1]);
  int h = n / 2;
  return gcd(gcd_a(h, &a[0]), gcd_a(n - h, &a[h]));
}
int main(void) {
  int n;
  cin >> n;
  int val;
  int i;
  int A[n];
  for (i = 0; i < n; i++) {
    cin >> val;
    A[i] = val;
  }
  int size_A = sizeof(A) / sizeof(*A);
  int gcd = gcd_a(size_A, A);
  if (gcd == 1) {
    if (flag == 0) {
      cout << "setwise coprime";
    } else {
      int m = v.size();
      unordered_map<int, int> hash;
      for (int i = 0; i < n; i++) hash[v[i]]++;
      int max_count = 0, res = -1;
      for (auto i : hash) {
        if (max_count < i.second) {
          res = i.first;
          max_count = i.second;
        }
      }
      if (res >= n) {
        cout << "pairwise coprime";
      } else {
        cout << "setwise coprime";
      }
    }
  } else {
    cout << "not coprime";
  }
  return 0;
}
