#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  map<int, int> nums;
  vector<int> numsV;
  int allGcd;
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    nums[A]++;
    if (nums[A] == 1) {
      numsV.push_back(A);
    }
  }
  allGcd = numsV[0];
  for (auto num : nums) {
    allGcd = gcd(allGcd, num.first);
  }
  if (allGcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (int)numsV.size() - 1; i++) {
    for (int j = i + 1; j < (int)numsV.size(); j++) {
      if (gcd(numsV[i], numsV[j]) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
