#include <bits/stdc++.h>
using namespace std;
vector<long long> arr;
int cnt[1000010];
vector<int> prime;
bool cek_prime(int now) {
  int x;
  for (x = 2; x <= sqrt(now); x++) {
    if (now % x == 0) {
      return false;
    }
  }
  return true;
}
void bangkitkan() {
  int x;
  for (x = 2; x <= 1000010; x++) {
    if (cek_prime(x)) {
      prime.push_back(x);
    }
    if (x % 2) {
      x++;
    }
  }
}
void cek(int now) {
  int x;
  for (x = 0; x < prime.size(); x++) {
    if (now % prime[x] == 0) {
      cnt[prime[x]]++;
    }
  }
}
int main() {
  bangkitkan();
  int n;
  cin >> n;
  int temp = n;
  while (n--) {
    int a;
    cin >> a;
    cek(a);
  }
  int x;
  bool pcop = 1;
  bool scop = 1;
  for (x = 0; x < prime.size(); x++) {
    if (cnt[prime[x]] > 1) {
      pcop = 0;
    }
    if (cnt[prime[x]] == temp) {
      scop = 0;
    }
  }
  if (pcop) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (scop) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
