#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1LL << 30;
int n;
int a[1000010];
int num[1000010];
long long gcd(long long m, long long n) {
  if (n == 0) {
    return m;
  }
  return gcd(n, m % n);
}
int main() {
  cin >> n;
  int g = 0;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    g = gcd(g, a[i]);
    num[a[i]]++;
  }
  int i;
  for (i = 2; i <= 1000000; i++) {
    int x = 0;
    for (int j = i; j <= 1000000; j += i) x += num[j];
    if (x > 2) break;
  }
  if (i == 1000001) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
