#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using bigint = long long int;
using vi = vector<int>;
using vll = vector<long long int>;
int cnt[1000005];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int N;
  cin >> N;
  int G = 0;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    G = gcd(G, x);
    cnt[x]++;
  }
  if (G != 1) {
    cout << "not coprime"
         << "\n";
    return 0;
  }
  int ans = 0;
  bool flag = false;
  for (int i = 2; i <= 1000000; i++) {
    for (int j = 2 * i; j <= 1000000; j += i) {
      if (cnt[j] > 0) {
        ans++;
      }
    }
    if (ans > 1) {
      flag = true;
      break;
    }
  }
  if (flag && G == 1) {
    cout << "setwise coprime"
         << "\n";
  } else
    cout << "pairwise coprime"
         << "\n";
  return 0;
}
