#include <bits/stdc++.h>
using namespace std;
int n;
int a;
int cnt[1005];
int fpb;
int gcd(int a, int b) {
  while (b != 0) {
    int temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
bool isPrime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  vector<int> prime;
  for (int i = 2; i <= 1000; i++) {
    if (isPrime(i)) prime.push_back(i);
  }
  int maxi = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (i)
      fpb = gcd(fpb, a);
    else
      fpb = a;
    for (auto it : prime) {
      if (a % it == 0) {
        cnt[it]++;
      }
    }
  }
  bool pairwise = 1;
  for (int i = 0; i < 1001; i++) {
    if (cnt[i] > 1) pairwise = 0;
  }
  if (pairwise) {
    cout << "pairwise coprime"
         << "\n";
  } else if (fpb == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
  return 0;
}
