#include <bits/stdc++.h>
using namespace std;
template <typename Head>
void print(Head&& head) {
  cout << head << '\n';
}
template <typename Head, typename... Tail>
void print(Head&& head, Tail... tail) {
  cout << head << " ";
  print(tail...);
}
void chandan1() {
  int y = 1;
  return;
}
void chandan2() {
  for (long long int i = 0; i < 10; i++) {
    long long int x = 1;
  }
  return (chandan1());
}
bool prime[1000050 + 1];
vector<long long int> primes;
void sieve1() {
  for (int i = 0; i <= 1000050; i++) prime[i] = 1;
  prime[0] = prime[1] = 0;
  primes.push_back(2);
  for (long long int i = 4; i <= 1000050; i += 2) prime[i] = 0;
  for (int p = 3; p <= 1000050; p += 2) {
    if (prime[p] == 1) {
      primes.push_back(p);
      for (int i = p * 2; i <= 1000050; i += p) {
        prime[i] = 0;
      }
    }
  }
}
void solve(long long int a[], long long int n) {
  long long int i = 0;
  long long int maxi = -1;
  bool mp[3000001] = {0};
  for (long long int i = 0; i < n; i++) {
    maxi = max(maxi, a[i]);
    mp[a[i]] = 1;
  }
  while (primes[i] <= maxi) {
    long long int val = primes[i];
    long long int cnt = 0;
    while (val <= maxi) {
      if (mp[val]) cnt += 1;
      val += primes[i];
    }
    if (cnt == n) {
      print("not coprime");
      return;
    } else if (cnt > 1) {
      print("setwise coprime");
      return;
    }
    i++;
  }
  print("pairwise coprime");
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  sieve1();
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    ;
    solve(a, n);
  }
  return 0;
}
