Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define rep1(i, n) for(int i=1; i<n; i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef int64_t lint;
lint gcd(lint a, lint b) { return b?gcd(b,a%b):a;}
lint lcm(lint a, lint b) { return a/gcd(a,b)*b;}

int main() {
	int N;
	cin >> N;
	vector<int> v(N);
	rep(i, N) {
		cin >> v.at(i);
	}

	lint a=0, b=v.at(0), c=v.at(0), x, y, z;

	int a=1000001, b=0, c=0, x, y, z;
	vector<bool> P(a);
	fill(all(P), true);
	P.at(0) = false, P.at(1) = false;
	for(int i=2; i*i<=a-1; ++i) {
		if(P.at(i)) {
			for(int j=2; i*j<=a-1; ++j) {
				P.at(i*j) = false;
			}
		}
	}

	vector<int> PV;
	rep(i, a) {
		if (P.at(i)) PV.push_back(i);
	}

	bool f = true;
	rep(i, N) {
		x = v.at(i);
		rep(j, PV.size()) {
			y = PV.at(j);
			if (P.at(x)) {
				P.at(x) = false;
				break;
			}
			if (x < y) break;
			if (x % y == 0) {
				if (!P.at(y)) {
					f = false;
					break;
				}
				while (x % y == 0) x /= y;
				P.at(y) = false;
			}
		}
		if (!f) break;
	}
	if (f) {
		std::cout << "pairwise coprime" << '\n';
		return 0;
	}

	rep1(i, N) {
		c = gcd(c, v.at(i));
		if (c == 1) {
			std::cout << "setwise coprime" << '\n';
			return 0;

		}
	}

	std::cout << "not coprime" << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: conflicting declaration 'int a'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |             ^
a.cc:20:14: note: previous declaration as 'lint a'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |              ^
a.cc:22:24: error: conflicting declaration 'int b'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |                        ^
a.cc:20:19: note: previous declaration as 'lint b'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |                   ^
a.cc:22:29: error: conflicting declaration 'int c'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |                             ^
a.cc:20:30: note: previous declaration as 'lint c'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |                              ^
a.cc:22:34: error: conflicting declaration 'int x'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |                                  ^
a.cc:20:41: note: previous declaration as 'lint x'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |                                         ^
a.cc:22:37: error: conflicting declaration 'int y'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |                                     ^
a.cc:20:44: note: previous declaration as 'lint y'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |                                            ^
a.cc:22:40: error: conflicting declaration 'int z'
   22 |         int a=1000001, b=0, c=0, x, y, z;
      |                                        ^
a.cc:20:47: note: previous declaration as 'lint z'
   20 |         lint a=0, b=v.at(0), c=v.at(0), x, y, z;
      |                                               ^