#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;
  int allGcd;
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    nums[A]++;
    allGcd = A;
  }
  bool isPairwise = true;
  for (auto num : nums) {
    allGcd = gcd(allGcd, num.first);
    if (allGcd != 1) {
      isPairwise = false;
    }
  }
  if (allGcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (isPairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  cout << "setwise coprime" << endl;
  return 0;
}
