#include <bits/stdc++.h>
using namespace std;
const int N = 1e7;
bool isprime[N + 1];
void sieve() {
  memset(isprime, true, sizeof(isprime));
  isprime[0] = isprime[1] = false;
  for (long long i = 2; i * i <= N; i++) {
    if (isprime[i]) {
      for (long long j = i * i; j <= N; j += i) {
        isprime[j] = false;
      }
    }
  }
}
int main(void) {
  sieve();
  vector<int> v;
  for (int i = 2; i <= N; i++) {
    if (isprime[i]) {
      v.push_back(i);
    }
  }
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  map<int, int> m;
  for (int j = 0; j < n; j++) {
    int x = arr[j];
    for (int i = 0; v[i] * v[i] <= x; i++) {
      if (x % v[i] == 0) {
        m[v[i]]++;
        while (x % v[i] == 0) {
          x /= v[i];
        }
      }
    }
    if (x) {
      m[x]++;
    }
  }
  int ans = 0;
  map<int, int>::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    ans = max(ans, it->second);
  }
  if (ans <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (ans < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
