#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> data(n);
  for (long long i = 0; i < (n); i++) {
    int tmp;
    cin >> tmp;
    data.at(i) = tmp;
  }
  sort(data.begin(), data.end());
  vector<int> checks(1000, 1);
  checks.at(0) = 0;
  checks.at(1) = 0;
  for (int i = 2; i < 1000; i++) {
    if (checks.at(i) == 1) {
      for (int j = 2 * i; j < 1000; j += i) {
        checks.at(j) = 0;
      }
    }
  }
  vector<int> primes;
  for (int i = 2; i <= 999; i++) {
    if (checks.at(i) == 1) {
      primes.push_back(i);
    }
  }
  int t = int(primes.size());
  vector<int> result(t);
  for (long long i = 0; i < (t); i++) {
    int tmp = 0;
    for (long long j = 0; j < (n); j++) {
      if (data.at(j) % primes.at(i) == 0) {
        tmp++;
      }
    }
    result.at(i) = tmp;
  }
  sort(result.begin(), result.end());
  int cnt = 0;
  for (long long i = 0; i < (n); i++) {
    if (data.at(i) == 1) {
      cnt++;
    }
  }
  if (result.at(t - 1) <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (result.at(t - 1) != n or cnt >= 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
