#include <bits/stdc++.h>
using namespace std;
const int sz = 1e6 + 1;
int cnt[sz], num[sz];
int gcd(int a, int b) {
  while (b) {
    int t = a;
    a = b;
    b = t % b;
  }
  return a;
}
int main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  bool f = false;
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> num[i];
    int t = num[i], d = 2;
    while (t != 1 && !f) {
      if (t % d == 0) {
        if (++cnt[d] > 1) f = true;
        while (t % d == 0) t /= d;
      }
      d++;
    }
  }
  if (!f)
    cout << "pairwise coprime";
  else {
    int g = num[1];
    for (int i = 2; i <= N; i++) g = gcd(g, num[i]);
    if (g == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
