#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MINV = 1;
const int MAXV = 10;
long long mod(long long x) { return (x % (long long)1000000007); }
long long add(long long a, long long b) { return mod(mod(a) + mod(b)); }
long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void findgcd(vector<int> &arr) {
  int n = arr.size();
  int result = arr[0];
  bool pair = true;
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    for (int j = i + 1; j < n; j++) {
      if (gcd(arr[i], arr[j]) != 1) {
        pair = false;
        break;
      }
    }
  }
  if (result > 1) {
    cout << "not coprime" << endl;
  } else {
    if (pair) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<int> A(n);
  for (auto &x : A) cin >> x;
  findgcd(A);
  return 0;
}
