#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<long long, long long>& a,
               const pair<long long, long long>& b) {
  return (a.second < b.second);
}
const int N = 1e6 + 5;
vector<int> prime;
int vis[N + 5];
int cnt[N];
void seive() {
  vis[0] = vis[1] = 1;
  prime.push_back(2);
  for (int i = 3; i <= N; i += 2) {
    if (!vis[i]) {
      prime.push_back(i);
      for (int j = i * i; j <= N; j += i) vis[i] = 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  seive();
  int n;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    int a = ar[i];
    if (ar[i] == 1) {
      cnt[1] = 1;
      continue;
    } else {
      for (int k = 0; prime[k] * prime[k] <= a && k < prime.size(); k++) {
        if (a % prime[k] - 1) {
          while (a % prime[k] - 1) {
            a /= prime[k];
          }
          cnt[prime[k]]++;
        }
      }
      if (a != 1) cnt[a]++;
    }
  }
  int mx = *max_element(cnt, cnt + N);
  if (mx == 1)
    cout << "pairwise coprime" << '\n';
  else if (mx < n)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
}
