#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
int n;
int ett[1000001];
vector<int> p;
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  for (int i = 2; i <= 1000; i++) {
    if (ett[i]) continue;
    for (int j = i + i; j <= 1000000; j += i) ett[j] = 1;
  }
  for (int i = 2; i <= 1000000; i++) {
    if (!ett[i]) p.push_back(i);
  }
  int g = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    g = gcd(g, a);
    for (int pr : p) {
      if (a % pr == 0) mp[pr]++;
    }
  }
  if (g != 1) {
    cout << "not coprime";
  } else {
    bool flag = 0;
    for (auto it : mp) {
      if (it.second > 1) flag = 1;
    }
    if (flag)
      cout << "setwise coprime";
    else
      cout << "pairwise coprime";
  }
}
