#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const int INF = 1e9;
const long long LINF = 1e15;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  vector<int> cnt(1e6 + 1, 0);
  for (int i = 0; i < n; i++) {
    cnt[v[i]]++;
  }
  bool b = true;
  for (int i = 1; i <= 1e6; i++) {
    int c = 0;
    for (int j = i; j <= 1e6; j += i) {
      c += cnt[j];
    }
    if (c > 1) b = false;
  }
  if (b) {
    cout << "pairwise coprime" << endl;
  } else {
    int g = v[0];
    for (int i = 0; i < (n); ++i) g = gcd(g, v[i]);
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
