#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int minPrimeFactor[1000001];
bool isPrime[1000001];
bool isExist[1000001];
int a[1000000];
int main() {
  for (int i = 0; i < (1000001); ++i) {
    isPrime[i] = true;
    isExist[i] = false;
  }
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (isPrime[i]) {
      for (int j = i; j <= 1000000; j += i) {
        if (isPrime[j]) {
          minPrimeFactor[j] = i;
          isPrime[j] = false;
        }
      }
    }
  }
  minPrimeFactor[1] = 1;
  for (int i = 0; i < (n); ++i) {
    vector<int> factors;
    factors.push_back(minPrimeFactor[a[i]]);
    int next = a[i] / minPrimeFactor[a[i]];
    while (next != 1) {
      int factor = minPrimeFactor[next];
      if (factor != factors[factors.size() - 1]) {
        factors.push_back(factor);
      }
      next = next / factor;
    }
    for (int j = 0; j < (factors.size()); ++j) {
      if (isExist[factors[j]])
        ans = 1;
      else
        isExist[factors[j]] = true;
    }
  }
  if (ans == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = a[0];
  for (int i = 0; i < (n - 1); ++i) {
    g = gcd(a[i + 1], g);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
