#include <bits/stdc++.h>
using namespace std;
bool num[(int)1e6 + 1];
bool forPrime[(int)1e6 + 1];
void init() {
  for (int i = 0; i <= (int)1e6; i++) {
    num[i] = false;
    forPrime[i] = true;
  }
  num[2] = true;
  forPrime[0] = true;
  forPrime[1] = true;
}
vector<int> primes(int n) {
  vector<int> v;
  bool flag;
  for (int i = 2; i <= sqrt(n); i++) {
    flag = false;
    while (n % i == 0) {
      if (!flag) {
        v.push_back(i);
        flag = true;
      }
      n = n / i;
    }
  }
  if (n != 1) {
    v.push_back(n);
  }
  return v;
}
vector<int> getPrimes(int n) {
  vector<int> v;
  bool flag;
  forPrime[2] = true;
  for (int i = 2; i <= sqrt(n); i++) {
    if (forPrime[i]) {
      v.push_back(i);
    }
    for (int j = 1; j * i <= n; j++) {
      forPrime[j] = false;
    }
  }
  return v;
}
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main(void) {
  init();
  int N;
  vector<int> v;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int tmp;
    cin >> tmp;
    v.push_back(tmp);
    num[tmp] = true;
  }
  int a, b;
  sort(v.begin(), v.end());
  a = v[0];
  for (int i = 1; i < N; i++) {
    b = v[i];
    a = gcd(a, b);
  }
  if (a != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (v[N - 1] == v[N - 2]) {
    cout << "not coprime" << endl;
  }
  vector<int> p = getPrimes(v[N - 1]);
  for (int i = 0; i < p.size(); i++) {
    int count = 0;
    for (int j = 0; j < v.size(); j++) {
      if (v[j] % p[i] == 0) {
        count++;
      }
    }
    if (count >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
