#include <bits/stdc++.h>
using namespace std;
long long int spf[100001];
long long int check[100001];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 100001; i++) spf[i] = i;
  for (long long int i = 4; i < 100001; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 100001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void getFactorization(long long int x) {
  while (x != 1) {
    check[spf[x]]++;
    x = x / spf[x];
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  long long int n;
  cin >> n;
  long long int a[n];
  memset(check, 0, sizeof(check));
  for (long long int i = 0; i < n; ++i) {
    cin >> a[i];
    getFactorization(a[i]);
  }
  long long int sw = 1;
  long long int pw = 1;
  for (long long int i = 2; i < 10000; ++i) {
    if (check[i] >= n) {
      sw = 0;
    }
    if (check[i] > 1) pw = 0;
  }
  if (pw == 1)
    cout << "pairwise coprime"
         << "\n";
  else {
    if (sw == 1)
      cout << "setwise coprime"
           << "\n";
    else
      cout << "not coprime"
           << "\n";
  }
}
