#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
int gcd(int a, int b) {
  int r, tmp;
  if (a < b) {
    tmp = a;
    a = b;
    b = tmp;
  }
  r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
vector<int> prime(1000000, 0);
int amax = 1000001;
vector<bool> isPrime(amax + 1, true);
void pr() {
  int p = 0;
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i <= amax; ++i) {
    if (isPrime[i]) {
      prime[p] = i;
      ++p;
      for (int j = i * 2; j <= amax; j += i) isPrime[j] = false;
    }
  }
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  pr();
  vector<bool> used(1000001, false);
  int x = a[0];
  bool f = true;
  for (int i = 0; i < n; ++i) {
    x = gcd(x, a[i]);
    int t = a[i];
    for (int j = 0; prime[j] * prime[j] <= a[i]; ++j) {
      if (t % prime[j] == 0) {
        if (used[j] == true) {
          f = false;
        }
        while (t % prime[j] == 0) {
          t /= prime[j];
        }
        used[j] = true;
      }
    }
    if (t > 1) {
      if (used[t] == true) {
        f = false;
      }
      used[t] = true;
    }
  }
  if (f) {
    cout << "pairwise coprime" << endl;
  } else if (x == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
