#include <bits/stdc++.h>
using namespace std;
long long n, a[1000001];
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  bool setco = 0, pairco = 1;
  long long Gcd;
  for (long long i = 0; i < (n); i++) {
    cin >> a[i];
    Gcd = (i ? gcd(a[i], Gcd) : a[i]);
    if (pairco)
      for (long long j = 0; j < (i); j++)
        if (gcd(a[j], a[i]) != 1) pairco = 0;
  }
  if (pairco) {
    cout << "pairwise coprime\n";
    return 0;
  }
  if (Gcd == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
