#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string ans[] = {"pairwise coprime", "setwise coprime", "not coprime"};
  long long n;
  cin >> n;
  vector<long long> v(1010101);
  vector<long long> num(1010101);
  long long g = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    g = gcd(g, v[i]);
    num[v[i]]++;
  }
  long long val = -1;
  int i;
  for (i = 2; i <= 1000000; i++) {
    long long x = 0;
    for (int j = i; j <= 100000; j += i) {
      x += num[j];
    }
    if (x >= 2) break;
  }
  if (i == 1000001)
    val = 0;
  else if (g == 1)
    val = 1;
  else
    val = 2;
  cout << ans[val];
  return 0;
}
