Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cctype>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cstdlib>
#include <iomanip>#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cctype>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cstdlib>
#include <iomanip>
#include <list>
#include <regex>
using namespace std;
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define all(obj) (obj).begin(), (obj).end()
#define m_p make_pair
#define rond(a, b) ((a) + (b) - 1) / (b)
using lli = long long;
using vect = vector<lli>;
using vecvec = vector<vect>;
using ipair = pair<lli, lli>;
using p_q = priority_queue<lli>;
constexpr lli inf = 1e15;
constexpr lli mod = 1e9 + 7;
int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };

class unionfind
{
public:
	int size;

	unionfind(int n) {
		size = n;
		for (int i = 0; i < n; i++) {
			par.push_back(i);
			rank.push_back(0);
			len.push_back(1);
		}
	};
	int find(int n) {
		if (par[n] == n)
			return n;
		else
			return par[n] = find(par[n]);
	};
	void unite(int n, int m) {
		n = find(n);
		m = find(m);
		if (n == m) return;
		size--;
		if (rank[n] < rank[m]) {
			par[n] = m;
			len[m] += len[n];
		}
		else {
			par[m] = n;
			len[n] += len[m];
		}
		if (rank[n] == rank[m])
			rank[n]++;
	};
	bool same(int n, int m) {
		return find(n) == find(m);
	};
	int length(int n) {
		return len[find(n)];
	}
private:
	vect par;
	vect rank;
	vect len;
};

class seg_tree
{
public:
	seg_tree(vect v) {
		n = 1;
		while (n < v.size()) n *= 2;
		node.resize(n * 2 - 1);
		rep(i, v.size()) node[i + n - 1] = v[i];
		for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2];
	};
	void update(int x, lli val) {
		x += n - 1;
		node[x] = val;
		while (x > 0) {
			x = (x - 1) / 2;
			node[x] = node[2 * x + 1] + node[2 * x + 2];
		}
	};
	lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		if (r <= a || b <= l) return 0;
		if (a <= l && r <= b) return node[k];
		return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r);
	};
private:
	int n;
	vect node;
};

class lazy_seg_tree
{
public:
	lazy_seg_tree(vect v) {
		n = 1;
		while (n < v.size()) n *= 2;
		node.resize(n * 2 - 1, inf);
		lazy.resize(n * 2 - 1, inf);
		rep(i, v.size()) node[i + n - 1] = v[i];
		for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]);
	};
	void eval(int k, int l, int r) {
		if (lazy[k] != inf) {
			node[k] = min(node[k], lazy[k]);
			if (r - l > 1) {
				lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]);
				lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]);
			}
			lazy[k] = inf;
		}
	};
	void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		eval(k, l, r);
		if (b <= l || r <= a) return;
		if (a <= l && r <= b) {
			lazy[k] = min(lazy[k], x);
			eval(k, l, r);
		}
		else {
			update(a, b, x, 2 * k + 1, l, (l + r) / 2);
			update(a, b, x, 2 * k + 2, (l + r) / 2, r);
			node[k] = min(node[2 * k + 1], node[2 * k + 2]);
		}
	};
	lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		if (r <= a || b <= l) return inf;
		eval(k, l, r);
		if (a <= l && r <= b) return node[k];
		return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r));
	};
private:
	int n;
	vect node, lazy;
};

template<class T>
vector<pair<T, int>> rle(vector<T> vec) {
	vector<pair<T, int>> ans;
	ans.emplace_back(vec.front(), 1);
	for (int i = 1; i < vec.size(); i++) {
		if (vec[i] == ans.back().first)
			ans.back().second++;
		else
			ans.emplace_back(vec[i], 1);
	}
	return ans;
}

vect cum_sum(vect v) {
	vect ans(v.size() + 1);
	rep(i, v.size())
		ans[i + 1] = ans[i] + v[i];
	return ans;
}

vecvec cum_sum_2d(vecvec v) {
	vecvec ans(v.size() + 1, vect(v[0].size() + 1));
	rep(i, v.size())
		rep(j, v[0].size())
		ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j];
	return ans;
}

vector<bool> eratosthenes(int n) {
	vector<bool> ans(n + 1, 1);
	ans[1] = 0;
	for (int i = 2; i * i <= n; i++) {
		if (ans[i] == 0) continue;
		for (int j = i; i * j <= n; j++)
			ans[i * j] = 0;
	}
	return ans;
}

bool prime(int n) {
	for (int i = 2; i * i <= n; i++)
		if (n % i == 0)
			return false;
	return true;
}

vector<ipair> fact(int n) {
	vector<ipair> ans;
	auto era = eratosthenes(floor(sqrt(n)));
	for (int i = 2; i * i <= n; i++) {
		if (era[i] == 0) continue;
		if (n % i == 0) {
			ans.emplace_back(i, 1);
			n /= i;
		}
		while (n % i == 0) {
			ans.back().second++;
			n /= i;
		}
	}
	if (n != 1)
		ans.emplace_back(n, 1);
	return ans;
}

lli gcd(lli a, lli b) {
	if (a < b)
		swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}

#define lcm(a, b) (a) / gcd((a), (b)) * (b)

lli s[100000], t[100000];

int main() {
	int a, b;
	cin >> a >> b;
	cout << (a * b % 3 == 1 ? "Impossible" : "Possible") << endl;
}
#include <list>
#include <regex>
using namespace std;
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define all(obj) (obj).begin(), (obj).end()
#define m_p make_pair
#define rond(a, b) ((a) + (b) - 1) / (b)
using lli = long long;
using vect = vector<lli>;
using vecvec = vector<vect>;
using ipair = pair<lli, lli>;
using p_q = priority_queue<lli>;
constexpr lli inf = 1e15;
constexpr lli mod = 1e9 + 7;
int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };

class unionfind
{
public:
	int size;

	unionfind(int n) {
		size = n;
		for (int i = 0; i < n; i++) {
			par.push_back(i);
			rank.push_back(0);
			len.push_back(1);
		}
	};
	int find(int n) {
		if (par[n] == n)
			return n;
		else
			return par[n] = find(par[n]);
	};
	void unite(int n, int m) {
		n = find(n);
		m = find(m);
		if (n == m) return;
		size--;
		if (rank[n] < rank[m]) {
			par[n] = m;
			len[m] += len[n];
		}
		else {
			par[m] = n;
			len[n] += len[m];
		}
		if (rank[n] == rank[m])
			rank[n]++;
	};
	bool same(int n, int m) {
		return find(n) == find(m);
	};
	int length(int n) {
		return len[find(n)];
	}
private:
	vect par;
	vect rank;
	vect len;
};

class seg_tree
{
public:
	seg_tree(vect v) {
		n = 1;
		while (n < v.size()) n *= 2;
		node.resize(n * 2 - 1);
		rep(i, v.size()) node[i + n - 1] = v[i];
		for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2];
	};
	void update(int x, lli val) {
		x += n - 1;
		node[x] = val;
		while (x > 0) {
			x = (x - 1) / 2;
			node[x] = node[2 * x + 1] + node[2 * x + 2];
		}
	};
	lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		if (r <= a || b <= l) return 0;
		if (a <= l && r <= b) return node[k];
		return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r);
	};
private:
	int n;
	vect node;
};

class lazy_seg_tree
{
public:
	lazy_seg_tree(vect v) {
		n = 1;
		while (n < v.size()) n *= 2;
		node.resize(n * 2 - 1, inf);
		lazy.resize(n * 2 - 1, inf);
		rep(i, v.size()) node[i + n - 1] = v[i];
		for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]);
	};
	void eval(int k, int l, int r) {
		if (lazy[k] != inf) {
			node[k] = min(node[k], lazy[k]);
			if (r - l > 1) {
				lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]);
				lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]);
			}
			lazy[k] = inf;
		}
	};
	void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		eval(k, l, r);
		if (b <= l || r <= a) return;
		if (a <= l && r <= b) {
			lazy[k] = min(lazy[k], x);
			eval(k, l, r);
		}
		else {
			update(a, b, x, 2 * k + 1, l, (l + r) / 2);
			update(a, b, x, 2 * k + 2, (l + r) / 2, r);
			node[k] = min(node[2 * k + 1], node[2 * k + 2]);
		}
	};
	lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		if (r <= a || b <= l) return inf;
		eval(k, l, r);
		if (a <= l && r <= b) return node[k];
		return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r));
	};
private:
	int n;
	vect node, lazy;
};

template<class T>
vector<pair<T, int>> rle(vector<T> vec) {
	vector<pair<T, int>> ans;
	ans.emplace_back(vec.front(), 1);
	for (int i = 1; i < vec.size(); i++) {
		if (vec[i] == ans.back().first)
			ans.back().second++;
		else
			ans.emplace_back(vec[i], 1);
	}
	return ans;
}

vect cum_sum(vect v) {
	vect ans(v.size() + 1);
	rep(i, v.size())
		ans[i + 1] = ans[i] + v[i];
	return ans;
}

vecvec cum_sum_2d(vecvec v) {
	vecvec ans(v.size() + 1, vect(v[0].size() + 1));
	rep(i, v.size())
		rep(j, v[0].size())
		ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j];
	return ans;
}

vector<bool> eratosthenes(int n) {
	vector<bool> ans(n + 1, 1);
	ans[1] = 0;
	for (int i = 2; i * i <= n; i++) {
		if (ans[i] == 0) continue;
		for (int j = i; i * j <= n; j++)
			ans[i * j] = 0;
	}
	return ans;
}

bool prime(int n) {
	for (int i = 2; i * i <= n; i++)
		if (n % i == 0)
			return false;
	return true;
}

vector<ipair> fact(int n) {
	vector<ipair> ans;
	auto era = eratosthenes(floor(sqrt(n)));
	for (int i = 2; i * i <= n; i++) {
		if (era[i] == 0) continue;
		if (n % i == 0) {
			ans.emplace_back(i, 1);
			n /= i;
		}
		while (n % i == 0) {
			ans.back().second++;
			n /= i;
		}
	}
	if (n != 1)
		ans.emplace_back(n, 1);
	return ans;
}

lli gcd(lli a, lli b) {
	if (a < b)
		swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}

#define lcm(a, b) (a) / gcd((a), (b)) * (b)

lli s[100000], t[100000];

int main() {
	int a, b;
	cin >> a >> b;
	cout << (a * b % 3 == 2 ? "Impossible" : "Possible") << endl;
}

Compiler output:
a.cc:16:19: warning: extra tokens at end of #include directive
   16 | #include <iomanip>#define _USE_MATH_DEFINES
      |                   ^
a.cc:264:15: error: redefinition of 'constexpr const lli inf'
  264 | constexpr lli inf = 1e15;
      |               ^~~
a.cc:44:15: note: 'constexpr const lli inf' previously defined here
   44 | constexpr lli inf = 1e15;
      |               ^~~
a.cc:265:15: error: redefinition of 'constexpr const lli mod'
  265 | constexpr lli mod = 1e9 + 7;
      |               ^~~
a.cc:45:15: note: 'constexpr const lli mod' previously defined here
   45 | constexpr lli mod = 1e9 + 7;
      |               ^~~
a.cc:266:5: error: redefinition of 'int dx [4]'
  266 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };
      |     ^~
a.cc:46:5: note: 'int dx [4]' previously defined here
   46 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };
      |     ^~
a.cc:266:27: error: redefinition of 'int dy [4]'
  266 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };
      |                           ^~
a.cc:46:27: note: 'int dy [4]' previously defined here
   46 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 };
      |                           ^~
a.cc:268:7: error: redefinition of 'class unionfind'
  268 | class unionfind
      |       ^~~~~~~~~
a.cc:48:7: note: previous definition of 'class unionfind'
   48 | class unionfind
      |       ^~~~~~~~~
a.cc:315:7: error: redefinition of 'class seg_tree'
  315 | class seg_tree
      |       ^~~~~~~~
a.cc:95:7: note: previous definition of 'class seg_tree'
   95 | class seg_tree
      |       ^~~~~~~~
a.cc:344:7: error: redefinition of 'class lazy_seg_tree'
  344 | class lazy_seg_tree
      |       ^~~~~~~~~~~~~
a.cc:124:7: note: previous definition of 'class lazy_seg_tree'
  124 | class lazy_seg_tree
      |       ^~~~~~~~~~~~~
a.cc:392:22: error: redefinition of 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)'
  392 | vector<pair<T, int>> rle(vector<T> vec) {
      |                      ^~~
a.cc:172:22: note: 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' previously declared here
  172 | vector<pair<T, int>> rle(vector<T> vec) {
      |                      ^~~
a.cc:404:6: error: redefinition of 'vect cum_sum(vect)'
  404 | vect cum_sum(vect v) {
      |      ^~~~~~~
a.cc:184:6: note: 'vect cum_sum(vect)' previously defined here
  184 | vect cum_sum(vect v) {
      |      ^~~~~~~
a.cc:411:8: error: redefinition of 'vecvec cum_sum_2d(vecvec)'
  411 | vecvec cum_sum_2d(vecvec v) {
      |        ^~~~~~~~~~
a.cc:191:8: note: 'vecvec cum_sum_2d(vecvec)' previously defined here
  191 | vecvec cum_sum_2d(vecvec v) {
      |        ^~~~~~~~~~
a.cc:419:14: error: redefinition of 'std::vector<bool> eratosthenes(int)'
  419 | vector<bool> eratosthenes(int n) {
      |              ^~~~~~~~~~~~
a.cc:199:14: note: 'std::vector<bool> eratosthenes(int)' previously defined here
  199 | vector<bool> eratosthenes(int n) {
      |              ^~~~~~~~~~~~
a.cc:430:6: error: redefinition of 'bool prime(int)'
  430 | bool prime(int n) {
      |      ^~~~~
a.cc:210:6: note: 'bool prime(int)' previously defined here
  210 | bool prime(int n) {
      |      ^~~~~
a.cc:437:15: error: redefinition of 'std::vector<std::pair<long long int, long long int> > fact(int)'
  437 | vector<ipair> fact(int n) {
      |               ^~~~
a.cc:217:15: note: 'std::vector<std::pair<long long int, long long int> > fact(int)' previously defined here
  217 | vector<ipair> fact(int n) {
      |               ^~~~
a.cc:456:5: error: redefinition of 'lli gcd(lli, lli)'
  456 | lli gcd(lli a, lli b) {
      |     ^~~
a.cc:236:5: note: 'lli gcd(lli, lli)' previously defined here
  236 | lli gcd(lli a, lli b) {
      |     ^~~
a.cc:465:5: error: redefinition of 'lli s [100000]'
  465 | lli s[100000], t[100000];
      |     ^
a.cc:245:5: note: 'lli s [100000]' previously declared here
  245 | lli s[100000], t[100000];
      |     ^
a.cc:465:16: error: redefinition of 'lli t [100000]'
  465 | lli s[100000], t[100000];
      |                ^
a.cc:245:16: note: 'lli t [100000]' previously declared here
  245 | lli s[100000], t[100000];
      |                ^
a.cc:467:5: error: redefinition of 'int main()'
  467 | int main() {
      |     ^~~~
a.cc:247:5: note: 'int main()' previously defined here
  247 | int main() {
      |     ^~~~