#include <bits/stdc++.h>
using namespace std;
long long dep(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return dep(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  long long ch[1000010];
  for (long long i = 0; i < n; i++) {
    cin >> ch[i];
  }
  long long ch2[1000010] = {};
  for (long long i = 2; i < 1000010; i++) {
    for (long long j = 1; i * j < 100010; j++) {
      long long now = i * j;
      if (ch2[now] == 0) {
        ch2[i * j] = i;
      }
    }
  }
  long long ch3[1000010] = {};
  bool ans1 = true;
  for (long long i = 0; i < n; i++) {
    long long now = ch[i];
    long long next = ch2[now];
    if (ch3[next] == false) {
      ch3[next] = true;
    } else {
      ans1 = false;
    }
  }
  if (ans1) {
    cout << "pairwise coprime";
    return 0;
  }
  long long gcd = ch[0];
  for (long long i = 1; i < n; i++) {
    gcd = dep(max(gcd, ch[i]), min(gcd, ch[i]));
  }
  if (gcd == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
