#include <iostream>
#include <numeric>
#include <vector>

using namespace std;
using ll = long long;

vector<ll> enumerate_divisors(ll n, bool sorted = false, bool reverse = false) {
  vector<ll> ret;
  ll i = floor(sqrt(n));
  if (i * i == n) {
    ret.push_back(i);
    --i;
  }
  while (i) {
    if (n % i == 0) {
      ret.push_back(i);
      ret.push_back(n / i);
    }
    i--;
  }

  if (sorted) {
    if (reverse) {
      sort(ret.begin(), ret.end(), greater<>());
    } else {
      sort(ret.begin(), ret.end());
    }
  }
  return ret;
}

int main() {
  int N, A, G, P{1};
  bool d[1000001]{};
  cin >> N;
  cin >> G;
  auto v = enumerate_divisors(G, 1, 0);
  for (auto a: v) {
    if (a != 1) d[a] = 1;
  }
  while(cin >> A) {
    G = gcd(G,A);
    auto v = enumerate_divisors(A, 1, 0);
    if (P) {
      for (auto a:v) {
        if (a != 1) {
          if (d[a]) P = 0;
          else d[a] = 1;
        }
      }
    }
  }
  cout << (P ? "pairwise coprime" : (G == 1) ? "setwise coprime" : "not coprime") << endl;
}
