#include <bits/stdc++.h>
using namespace std;
bool prime[1000010];
void furui() {
  int i = 2;
  while (i <= 1000000) {
    int j = 2;
    while (j * j <= i && !prime[i]) {
      if (i % j == 0) {
        prime[i] = true;
        break;
      } else
        j++;
    }
    int z = 2;
    while (!prime[i]) {
      if (i * z <= 1000000) {
        prime[i * z] = true;
        z++;
      } else
        break;
    }
    i++;
  }
}
long long gcd(long long a, long long b) {
  if (b > a) {
    long long tmp = b;
    b = a;
    a = tmp;
  }
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  furui();
  int n;
  cin >> n;
  vector<int> a(n), p;
  for (int i = 2; i <= 1000000; i++) {
    if (!prime[i]) {
      p.push_back(i);
    }
  }
  int g = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      g = a[i];
    else
      g = gcd(g, a[i]);
  }
  if (g != 1)
    cout << "not coprime" << endl;
  else {
    if (p.size() < n)
      cout << "setwise coprime" << endl;
    else {
      set<int> s;
      bool flag = false;
      for (int i = 0; i < n; i++) {
        int t = a[i];
        int L = t;
        for (int j = 2; j * j <= t; j++) {
          if (t % j == 0) {
            while (t % j == 0) {
              t /= j;
            }
            if (s.count(j) == 0) {
              s.insert(j);
            } else {
              flag = true;
              break;
            }
          }
        }
        if (flag) break;
      }
      if (flag)
        cout << "setwise coprime" << endl;
      else
        cout << "pairwise coprime" << endl;
    }
  }
}
