#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<int> p;
vector<bool> p_table(1000000 + 1, true);
void prime() {
  p_table.at(0) = false, p_table.at(1) = false;
  for (int i = 2; i <= 1000000; i++) {
    if (p_table.at(i)) {
      p.push_back(i);
      for (int j = 2; i * j <= 1000000; j++) {
        p_table.at(i * j) = false;
      }
    }
  }
}
int gcd(int a, int b) {
  while (a % b != 0) {
    int tmp = a % b;
    a = b;
    b = tmp;
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  prime();
  int n = p.size();
  vector<int> count(n, 0);
  for (int i = 0; i < N; i++) {
    int a = A[i];
    int j = 0;
    while (a > 1) {
      if (a % p[j] == 0) {
        count[j]++;
        while (a % p[j] == 0) {
          a /= p[j];
        }
      }
      j++;
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (count[i] > 1) {
      flag = false;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else {
    int a = A[0];
    for (int i = 1; i < N; i++) {
      a = gcd(a, A[i]);
    }
    if (a == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
