#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int MOD = 1000000007;
vector<long long> factor_list;
template <class X>
void printArray(X *array, long long);
template <class X>
void printVector(vector<X> &v);
template <class X>
void printDimention(vector<vector<X> > &dv);
template <class X>
void printMap(X);
template <class X>
void printVecPair(vector<X> &v);
void printDV_Pair(vector<vector<pair<long long, long long> > > &v);
void printSet(set<long long> &S);
long long factor2(long long);
long long combination(long long, long long);
int factorial(int, int);
long long find_digits(long long);
int findSumOfDigits(int);
int degree(int);
int shishagonyu(double);
int roundUp(double);
int roundDown(double);
int roundOff(double);
long long gcd(long long, long long);
long long lcm(long long, long long);
vector<long long> primes;
vector<bool> isprime;
vector<long long> min_factor;
bool called_Eratosthenes = false;
bool can_min_factor;
void Eratosthenes(long long);
vector<pair<long long, long long> > prime_factorization(long long, long long);
bool odd_even(int);
long long abs_ll(long long);
long long div_one(long long, long long);
template <class X>
void StringtoVec(string, vector<X> &v);
void get_factor_list(long long);
long long RepeatSquaring(long long a, long long index);
const int TABLEMAX = 510000;
unsigned long long fac[TABLEMAX], inv[TABLEMAX], finv[TABLEMAX];
void COMinit();
long long COM(long long, long long);
long long combination_MOD(long long n, long long r);
long long RepeatSquaring_MOD(long long a, long long index, long long M);
long long N, k, K;
int main(int argc, char const *argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  vector<long long> A(N);
  for (long long i = (0); i < (N); ++i) cin >> A[i];
  long long lim = pow(10, 6);
  Eratosthenes(lim);
  bool pairwise_coprime = false, setwise_coprime = false, not_coprime = true;
  vector<pair<long long, long long> > bef = prime_factorization(A[0], lim),
                                      now = prime_factorization(A[0], lim);
  set<long long> prime_list;
  for (long long i = (1); i < (N); ++i) {
    bef = now;
    now = prime_factorization(A[i], lim);
    bool same = false;
    for (long long j = (0); j < (bef.size()); ++j) {
      for (long long k = (0); k < (now.size()); ++k) {
        long long b = bef[j].first, n = now[k].first;
        if (b == n) {
          same = true;
          if (b == 1) {
            same = false;
          } else {
            if (i > 1) {
              if (prime_list.find(b) == prime_list.end()) {
                setwise_coprime = true;
                not_coprime = false;
                pairwise_coprime = false;
              }
            }
            prime_list.insert(b);
          }
        }
      }
    }
    if (!same) {
      if (not_coprime) {
        not_coprime = false;
        pairwise_coprime = true;
      }
    } else {
      if (!not_coprime) {
        pairwise_coprime = false;
        setwise_coprime = true;
        break;
      }
    }
  }
  if (pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else if (not_coprime) {
    cout << "not coprime" << endl;
  }
  return 0;
}
template <class X>
void printArray(X array[], long long n) {
  for (long long i = (0); i < (n); ++i) {
    if (i) cout << " ";
    cout << array[i];
  }
  cout << endl;
}
template <class X>
void printVector(vector<X> &v) {
  for (long long i = (0); i < ((int)v.size()); ++i) {
    if (i) cout << " ";
    cout << v[i];
  }
  cout << endl;
}
template <class X>
void printDimention(vector<vector<X> > &dv) {
  for (long long i = (0); i < ((long long)dv.size()); ++i) {
    for (long long j = (0); j < ((long long)dv[i].size()); ++j) {
      if (j) cout << " ";
      cout << dv[i][j];
    }
    cout << endl;
  }
  cout << endl;
}
template <class X>
void printMap(X mp) {
  for (auto it : mp) {
    cout << it.first << " " << it.second << endl;
  }
}
template <class X>
void printVecPair(vector<X> &v) {
  for (long long i = (0); i < ((int)v.size()); ++i) {
    cout << v[i].first << " " << v[i].second << endl;
  }
  cout << endl;
}
void printDV_Pair(vector<vector<pair<long long, long long> > > &v) {
  for (long long i = (0); i < ((int)v.size()); ++i) {
    cout << i << endl;
    for (long long j = (0); j < ((int)v[i].size()); ++j) {
      cout << v[i][j].first << " " << v[i][j].second << endl;
    }
    cout << endl;
  }
  cout << endl;
}
void printSet(set<long long> &S) {
  for (set<long long>::iterator it = S.begin(); it != S.end(); it++) {
    if (it != --S.end())
      cout << *it << " ";
    else
      cout << *it << endl;
  }
}
long long factor2(long long num) {
  int cnt = 0;
  while (num % 2 == 0) {
    num /= 2;
    cnt++;
  }
  return cnt;
}
long long combination(long long n, long long r) {
  if (n == 0 || r == 0 || n < r) return 0;
  long long up = 1, down = 1;
  long long half = n / 2;
  if (r >= half) r = n - r;
  long long up_tmp = n, down_tmp = r;
  if (r == 0) return 1;
  for (long long i = (0); i < (r); ++i) {
    up *= up_tmp;
    up_tmp--;
    down *= down_tmp;
    down_tmp--;
  }
  return up / down;
}
int factorial(int n, int r) {
  if (n < r) {
    cout << "error" << endl;
    return 0;
  } else {
    int res = 1;
    while (r) {
      r--;
      res *= n;
      n--;
    }
    return res;
  }
}
long long find_digits(long long n) {
  int digit = 0;
  while (n) {
    n /= 10;
    digit++;
  }
  return digit;
}
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int degree(int n) {
  int count = 0;
  while (n > 1) {
    n /= 2;
    count++;
  }
  return count;
}
int shishagonyu(double x) { return (int)(x < 0.0 ? x - 0.5 : x + 0.5); }
int roundUp(double n) {
  if (n >= 0) {
    return (int)n + 1;
  } else {
    return (int)n - 1;
  }
}
int roundDown(double n) { return (int)n; }
int roundOff(double n) {
  double decimal = 0;
  decimal = n - (int)n;
  if (decimal >= 0.5 || decimal <= -0.5) {
    return roundUp(n);
  } else {
    return roundDown(n);
  }
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long m, long long n) {
  if (m == 0 || n == 0) return 0;
  return ((m / gcd(m, n)) * n);
}
void Eratosthenes(long long lim) {
  isprime.resize(lim + 1, true);
  min_factor.resize(lim + 1, -1);
  isprime[0] = isprime[1] = false;
  min_factor[0] = 0, min_factor[1] = 1;
  for (int i = 2; i <= lim; i++) {
    if (!isprime[i]) continue;
    primes.push_back(i);
    min_factor[i] = i;
    for (int j = i * 2; j <= lim; j += i) {
      isprime[j] = false;
      if (min_factor[j] == -1) min_factor[j] = i;
    }
  }
}
vector<pair<long long, long long> > prime_factorization(long long num,
                                                        long long lim) {
  vector<pair<long long, long long> > res_pf;
  if (lim <= pow(10, 8))
    can_min_factor = true;
  else
    can_min_factor = false;
  if (!called_Eratosthenes) {
    if (can_min_factor) {
      Eratosthenes(lim);
    } else {
      lim = sqrt(lim);
      Eratosthenes(lim);
    }
    called_Eratosthenes = true;
  }
  if (num < 2) {
    res_pf.push_back(make_pair(1, 1));
    return res_pf;
  }
  if (can_min_factor) {
    while (num != 1) {
      int prime = min_factor[num];
      int cnt = 0;
      while (min_factor[num] == prime) {
        num /= prime;
        cnt++;
      }
      res_pf.push_back(make_pair(prime, cnt));
    }
    return res_pf;
  } else {
    bool composite_num = false;
    long long index = 0;
    while (num != 1 && index < primes.size()) {
      int prime = primes[index];
      int cnt = 0;
      if (num % prime == 0) {
        composite_num = true;
        num /= prime;
        cnt++;
      } else {
        index++;
        res_pf.push_back(make_pair(prime, cnt));
      }
    }
    if (!composite_num) {
      cout << "num is composite_num: num = 1 * num" << endl;
      res_pf.push_back(make_pair(num, 1));
    }
    return res_pf;
  }
}
bool odd_even(int num) {
  bool judge;
  if (num % 2) {
    judge = true;
  } else {
    judge = false;
  }
  return judge;
}
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < TABLEMAX; i++) {
    fac[i] = (fac[i - 1] * i) % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = (finv[i - 1] * inv[i]) % MOD;
  }
}
long long COM(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long abs_ll(long long a) {
  if (a >= 0) {
    return a;
  } else {
    return -a;
  }
}
long long div_one(long long res, long long div) {
  return (res + div - 1) / div;
}
template <class X>
void StringtoVec(string str, vector<X> &v) {
  long long num = stoll(str);
  long long it = str.size() - 1;
  v.resize(str.size());
  while (num) {
    v[it] = num % 10;
    num /= 10;
    it--;
    if (it < 0) {
      cout << "reference error" << endl;
      break;
    }
  }
}
void get_factor_list(long long n) {
  int div = 1, res;
  while (n >= div * div) {
    if (n % div == 0) {
      res = div;
      long long tmp = n / res;
      factor_list.push_back(res);
      if (tmp != 1) factor_list.push_back(tmp);
      div++;
    } else {
      div++;
    }
  }
  sort(factor_list.begin(), factor_list.end());
}
long long RepeatSquaring_MOD(long long a, long long index, long long M) {
  if (index == 0) return 1;
  if (index % 2 == 0) {
    long long tmp = RepeatSquaring_MOD(a, index / 2, M);
    return tmp * tmp % M;
  } else {
    return a * RepeatSquaring_MOD(a, index - 1, M) % M;
  }
}
long long RepeatSquaring(long long a, long long index) {
  if (index == 0)
    return 1;
  else if (index % 2 == 0) {
    long long tmp = RepeatSquaring(a, index / 2);
    return tmp * tmp;
  } else {
    return a * RepeatSquaring(a, index - 1);
  }
}
long long combination_MOD(long long n, long long r) {
  long long nume = 1, denom = 1;
  for (long long i = (n - r + 1); i <= (n); ++i) {
    nume = (nume * i) % MOD;
  }
  for (long long i = (1); i <= (r); ++i) {
    denom = (denom * i) % MOD;
  }
  denom = RepeatSquaring_MOD(denom, MOD - 2, MOD);
  return (nume * denom) % MOD;
}
