#include <bits/stdc++.h>
using namespace std;
const long long N = 1000000007;
long long mark[10000000 + 1];
vector<long long> primes;
void seive() {
  memset(mark, 0, sizeof mark);
  mark[0] = mark[1] = 1;
  for (long long i = 3; i * i <= 10000000; i += 2) {
    if (mark[i] == 0) {
      for (long long j = i * i; j <= 10000000; j += 2 * i) {
        mark[j]++;
      }
    }
  }
  primes.push_back(2);
  for (long long i = 3; i <= 10000000; i += 2) {
    if (mark[i] == 0) {
      primes.push_back(i);
    }
  }
}
void solve() {
  long long n, a, b, c, ans = 0, count = 0, sum = 0;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  seive();
  map<long long, bool> m;
  bool check1 = true;
  for (long long i = 0; i < n; i++) {
    long long j = 0;
    long long curr = arr[i];
    while (primes[j] <= arr[i]) {
      if (curr % primes[j] == 0) {
        if (m[primes[j]]) {
          check1 = false;
        }
        m[primes[j]] = true;
        while (curr % primes[j] == 0) {
          curr /= primes[j];
        }
      }
      j++;
    }
  }
  if (check1) {
    cout << "pairwise coprime\n";
    return;
  } else {
    for (auto x : m) {
      bool check = true;
      for (long long i = 0; i < n; i++) {
        if (arr[i] % x.first != 0) {
          check = false;
          break;
        }
      }
      if (check) {
        cout << "not coprime";
        return;
      }
    }
  }
  cout << "setwise coprime";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  { solve(); }
  return 0;
}
