#include <bits/stdc++.h>
using namespace std;
const long long SIZE = 1e6 * 2 + 10, INF = 1e9 * 1e9 + 10;
set<int> smth;
long long lp[SIZE + 2], pr[SIZE + 2];
int gcd(int a, int b) {
  while (a * b != 0) {
    a %= b;
    swap(a, b);
  }
  return a + b;
}
bool flag = 0;
void fact(int a) {
  int d = 2;
  set<int> dd;
  if (a < 2) return;
  while (a > 1) {
    dd.insert(lp[a]);
    a /= lp[a];
  }
  for (int i : dd) smth.insert(i);
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  long long n;
  cin >> n;
  vector<long long> vec(n);
  for (long long i = 2; i < SIZE; i++) {
    if (pr[i]) continue;
    lp[i] = i;
    for (long long j = (i * i); j < SIZE; j += i) {
      pr[j] = 1;
      lp[j] = i;
    }
  }
  for (auto &i : vec) cin >> i;
  int ans = vec[0];
  for (int i = 0; i < n; i++) {
    ans = gcd(ans, vec[i]);
    fact(vec[i]);
  }
  if (flag == 0)
    cout << "pairwise coprime\n";
  else if (ans == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
