#include <bits/stdc++.h>
using namespace std;
long long INF = 1e9 + 7;
const int N = 1e6 + 7;
vector<bool> pm(N, false);
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void getPrimes(vector<int> &primes) {
  for (int i = 2; i < N; i++) {
    if (!pm[i]) {
      primes.push_back(i);
      for (int j = i; j < N; j += i) {
        pm[j] = true;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int ans = arr[0];
  for (int i = 1; i < n; i++) {
    ans = gcd(ans, arr[i]);
  }
  if (ans > 1) {
    cout << "not coprime" << endl;
  } else {
    vector<int> primes;
    getPrimes(primes);
    bool flag = true;
    for (int i = 0; i < primes.size(); i++) {
      int cnt = 0;
      for (int j = 0; j < n; j++) {
        if (arr[j] % primes[i] == 0) {
          cnt++;
          while (arr[j] % primes[i] == 0) {
            arr[j] = arr[j] / primes[i];
          }
        }
      }
      if (cnt >= 2) {
        flag = false;
        break;
      }
    }
    if (flag)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
}
