#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool gcda(int a[], int n) {
  int ans = a[0];
  for (int i = 0; i < n; i++) {
    ans = gcd(ans, a[i]);
  }
  return ans == 1;
}
long long int findlcm(int arr[], int n) {
  long long int ans = arr[0];
  for (int i = 1; i < n; i++)
    ans = (((arr[i] * ans)) / (gcd(arr[i], ans))) % 1000000007;
  return ans;
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int product = 1;
  for (int i = 0; i < n; i++) product = (product * a[i]) % 1000000007;
  long long int lcm = findlcm(a, n);
  if (product == lcm)
    cout << "pairwise coprime";
  else if (gcda(a, n)) {
    cout << "setwise coprime";
  } else
    cout << "not coprime";
}
int main() {
  {
    ios_base ::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  };
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
