#include <bits/stdc++.h>
using namespace std;
long long INFl = (long long)1e+18 + 1;
int INF = 1e+9 + 1;
bool arr[1000001];
int Nmax = 1000001;
vector<int> sosu;
void Eratosthenes() {
  for (int i = 0; i < Nmax; i++) {
    arr[i] = true;
  }
  arr[0] = false;
  arr[1] = false;
  for (int i = 2; i < sqrt(Nmax); i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < Nmax; j++) {
        arr[i * (j + 2)] = false;
      }
    }
  }
  for (int i = 0; i < Nmax; i++) {
    if (arr[i]) sosu.push_back(i);
  }
}
int A[1000001];
int insu[1000001] = {};
bool prime_factor_decomp(long long n) {
  vector<long long> p;
  long long m = n;
  for (int i = 0; i < sosu.size() && sosu[i] * sosu[i] <= n; ++i) {
    if (m % sosu[i] != 0) continue;
    int c = 0;
    while (m % sosu[i] == 0) c++, m /= sosu[i];
    insu[sosu[i]]++;
    if (insu[sosu[i]] >= 2) return 1;
  }
  return 0;
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  Eratosthenes();
  int N;
  cin >> N;
  for (int i = 0; i < (int)N; i++) cin >> A[i];
  bool flag = 1;
  for (int i = 0; i < (int)N; i++) {
    if (A[i] != 1) {
      bool f = prime_factor_decomp(A[i]);
      if (f) {
        flag = 0;
        break;
      }
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else {
    int g = 0;
    for (int i = 0; i < (int)N; i++) g = gcd(g, A[i]);
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
