#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int gcd(vector<int> nums) {
  int ret = nums[0];
  for (int i = 1; i < nums.size(); i++) {
    ret = gcd(ret, nums[i]);
  }
  return ret;
}
const int MAX_N = 1000000;
class Prime {
 public:
  vector<int> prime_list;
  Prime() {
    bool checked[MAX_N + 1];
    memset(checked, false, sizeof(checked));
    for (int i = 2; i <= MAX_N; ++i) {
      if (!checked[i]) {
        prime_list.push_back(i);
        for (int j = 2 * i; j <= MAX_N; j += i) {
          checked[j] = true;
        }
      }
    }
  }
  map<int, int> prime_division(int n) {
    map<int, int> res;
    for (int i = 0; prime_list[i] <= sqrt(n); ++i) {
      int p = prime_list[i];
      while (n % p == 0) {
        ++res[p];
        n /= p;
      }
    }
    if (n != 1) {
      res[n] = 1;
    }
    return res;
  }
};
int main() {
  int N;
  cin >> N;
  Prime prime;
  vector<int> A;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  int all_gcd = gcd(A);
  int max_v = 0;
  map<int, int> counter;
  for (int i = 0; i < N; ++i) {
    int a = A[i];
    map<int, int> res = prime.prime_division(a);
    for (auto e : res) {
      counter[e.first]++;
      max_v = max(max_v, counter[e.first]);
    }
  }
  if (max_v == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    if (all_gcd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
