#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);

  rep(i,n) cin >> a[i];
  vector<int> ok(1000010, 0);
  int g = a[0];
  for (int i = 1; i < n; i++) g = __gcd(g, a[i]);
  for (int i = 0; i < n; i++) ok[a[i]] = 1;
  int res = 1;

  for (int i = 2; i <= 1000000; i++) {
    int cnt = 0;
    for (int j = i; j <= 1000000; j += i) {
      if (ok[j]) cnt++;
    }
    if (cnt >= 2) res = 0;
  }

  if (res) cout << "pairwise coprime" << endl;
  else if (g == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  return 0;
}
