QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#931057#10037. Build WellningagoAC ✓1778ms157308kbC++148.4kb2025-03-10 19:06:062025-03-10 19:06:08

Judging History

This is the latest submission verdict.

  • [2025-03-10 19:06:08]
  • Judged
  • Verdict: AC
  • Time: 1778ms
  • Memory: 157308kb
  • [2025-03-10 19:06:06]
  • Submitted

answer

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <cctype>
#include <set>
#include <random>
#include <bitset>

namespace uvu
{
#define LOCAL ____________DONT_DEFINE_ME____________
#define ll long long
#define inf 0x3f3f3f3f
// #define int long long
// #define inf 0x3f3f3f3f3f3f3f3fll
#define infll 0x3f3f3f3f3f3f3f3fll
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define gline debug("now is #%d\n", __LINE__)
#define pii std::pair <int, int>
#define mkp std::make_pair
#define fi first
#define se second
char _ST_;
const int BUFSIZE = (1 << 20);
char ibuf[BUFSIZE], *iS = ibuf, *iT = ibuf;
char obuf[BUFSIZE], *oS = obuf, *oT = obuf + BUFSIZE;
char getc()
{
#ifdef LOCAL
	return getchar();
#else
	if(iS == iT) iT = (iS = ibuf) + fread(ibuf, 1, BUFSIZE, stdin);
	return iS == iT ? EOF : *iS++;
#endif
#define getchar ERR
}

void Flush() { fwrite(obuf, 1, oS - obuf, stdout); oS = obuf; }
struct Flusher { ~Flusher(){ Flush(); } }iamflusher;

void putc(char c)
{
#ifdef LOCAL
	putchar(c);
#else
	*oS++ = c;
	if(oS == oT) Flush();
#endif
#define putchar ERR
}

template <typename T = int> T read()
{
	T x = 0, f = 1; char c = getc();
	for(; !isdigit(c); c = getc()) if(c == '-') f = -1;
	for(;  isdigit(c); c = getc()) x = (x << 3) + (x << 1) + (c ^ 48);
	return x * f;
}

template <typename T> void print(T x, char c)
{
static int sta[BUFSIZE], top;
	top = 0;
	if(x < 0) putc('-'), x = -x;
	if(!x) sta[top = 1] = 0;
	for(; x; x /= 10) sta[++top] = x % 10;
	for(; top; ) putc(sta[top--] ^ 48);
	if(c) putc(c);
}

int readstr(char *s, int base)
{
	int idx = base - 1; char c = getc();
	for(; !(isdigit(c) || isalpha(c) || c == '#' || c == '.'); c = getc());
	for(;   isdigit(c) || isalpha(c) || c == '#' || c == '.' ; c = getc()) s[++idx] = c;
	return idx - base + 1;
}

void printf(const char *s) { for(; *s; s++) putc(*s); }
template <typename T, typename ... Args>
void printf(const char *s, T x, Args ... rest)
{
	for(; *s; s++)
	{
		if(*s != '%') { putc(*s); continue; }
		s++; if(*s == 'd') print(x, 0);
		else if(*s == 'c') putc(x);
		printf(s + 1, rest ...);
		return;
	}
}

template <typename T> void ckmax(T &x, T y) { x = x > y ? x : y; }
template <typename T> void ckmin(T &x, T y) { x = x < y ? x : y; }
#define mod 998244353
// #define mod 1000000007
int sm(int x) { return x >= mod ? x - mod : x; }
void plus_(int &x, int y) { x = (x + y >= mod ? x + y - mod : x + y); }
void mul_(int &x, int y) { x = 1ll * x * y % mod; }
int ksm(int a, int b) { int res = 1; for(; b; b >>= 1, mul_(a, a)) if(b & 1) mul_(res, a); return res; }
int gcd(int x, int y) { for(; y; x %= y, x ^= y ^= x ^= y); return x; }

/*
偏移量必须是整数,这是最强的一个条件。本质上是你无法用 eps 瞎搞了。

能凑出 m 是有解的一个必要条件。一个很脑筋急转弯的事情:若不使用 len=1 就能凑出 m,那直接对随意一种方案让偏移量 =0/1 即可。

否则的话,考虑让 len=1 代替 eps 的地位,看看有什么性质回来了。

“凑出m”这个问题变得没意义了,尝试找一个更严格的条件

上下两行不会产生包含关系,因为可以把小的那行全换成1

这样的话 >1 的段肯定是上下交错的,中间夹杂这一些1,但是你发现对于每次交替,小的那行依然没啥意义,可以删掉一些 1 换成大的那行。

这就代表上下两行 >1 的段是可以一一对应的,每个长度 len 都可以凑出 +[len, 2len-2]。就和上面的判定一样了。

形式像一个同余最短路,但是这个只能 O(n^2 log)。

多项式 exp 显然可以草,怎么构造方案?

min < sqrt 直接同余最短路。
min > sqrt 只会跳 sqrt 次
不会这个啊,还是分治NTT吧。

*/

#define N 300010
int n, m;
int a[N];
int from[N], S;
std::set <int> s;

namespace Sub1
{
ll dis[N];
int lst[N];
bool vis[N];
std::vector <int> vec;
void solve()
{
	memset(dis, 0x3f, sizeof(dis));
	dis[0] = 0;
	for(int i = S + 1; i <= m; i++) if(from[i]) vec.push_back(i);
	for(;;)
	{
		int k = -1;
		for(int i = 0; i < S; i++) if(!vis[i] && (!~k || dis[i] < dis[k])) k = i;
		if(!~k || dis[k] == infll) break;
		vis[k] = 1;
		for(int x : vec) if(dis[(k + x) % S] > dis[k] + x) dis[(k + x) % S] = dis[k] + x, lst[(k + x) % S] = x;
	}
	if(dis[m % S] > m) return printf("impossible\n");
	std::vector <int> v[2];
	int now = m;
	auto push = [&](int x) -> void
	{
		now -= x;
		v[0].push_back(from[x]);
		for(int i = from[x] + 1; i <= x; i++) v[0].push_back(1), v[1].push_back(1);
		v[1].push_back(from[x]);
	};
	while(now)
	{
		if(now != dis[now % S]) push(S);
		else push(lst[now % S]);
	}
	printf("possible\n");
	for(int _ = 0; _ < 2; _++)
	{
		printf("%d %d\n", v[_].size(), _);
		for(int x : v[_]) print(x, ' ');
		putc('\n');
	}
}
} // namespace Sub1

namespace Sub2
{
#define M 1100010
const int G = 3;
const int invG = ksm(G, mod - 2);
int len, tr[M];
void NTT(int *f, int n, int *tr, int op)
{
	for(int i = 0; i < n; i++) if(i < tr[i]) std::swap(f[i], f[tr[i]]);
	for(int p = 2; p <= n; p <<= 1) 
		for(int len = p >> 1, buf = ksm(op ? G : invG, (mod - 1) / p), k = 0; k < n; k += p)
			for(int i = k, tg = 1, tmp; i < k + len; i++, mul_(tg, buf))
				tmp = 1ll * tg * f[i + len] % mod, f[i + len] = sm(f[i] + mod - tmp), plus_(f[i], tmp);
	if(op) { for(int i = 0, invn = ksm(n, mod - 2); i < n; i++) mul_(f[i], invn); }
}

int fNTT[50][M], gNTT[50][M];
void divide1(int n, int dep)
{
	// printf("divide %d %d\n", n, dep);
	if(n == 1) { for(int i = 0; i < len; i++) fNTT[dep][i] = fNTT[0][i], gNTT[dep][i] = gNTT[0][i]; return; }
	if(n & 1)
	{
		divide1(n - 1, dep + 1);
		for(int i = 0; i < len; i++) fNTT[dep][i] = gNTT[dep][i] = 1ll * gNTT[dep + 1][i] * gNTT[0][i] % mod;
		NTT(fNTT[dep], len, tr, 1);
	}
	else
	{
		divide1(n / 2, dep + 1);
		for(int i = 0; i < len; i++) fNTT[dep][i] = gNTT[dep][i] = 1ll * gNTT[dep + 1][i] * gNTT[dep + 1][i] % mod;
		NTT(fNTT[dep], len, tr, 1);
	}
	for(int i = 0; i <= m; i++) gNTT[dep][i] = fNTT[dep][i] = !!fNTT[dep][i];
	for(int i = m + 1; i < len; i++) gNTT[dep][i] = fNTT[dep][i] = 0;
	NTT(gNTT[dep], len, tr, 0);
}

std::vector <int> v[2];

void push(int x)
{
	v[0].push_back(from[x]);
	for(int i = from[x] + 1; i <= x; i++) v[0].push_back(1), v[1].push_back(1);
	v[1].push_back(from[x]);
}

void divide2(int n, int dep, int m)
{
	if(!m) return;
	if(n == 1) { push(m); return; }
	if(n & 1)
	{
		int p = 0;
		while(p <= m && (!fNTT[0][p] || !fNTT[dep + 1][m - p])) p++;
		if(p > m)
		{
			printf("n = %d, dep = %d, m = %d\n", n, dep, m);
			exit(0);
		}
		if(p) push(p);
		divide2(n - 1, dep + 1, m - p);
	}
	else
	{
		int p = 0;
		while(p <= m && (!fNTT[dep + 1][p] || !fNTT[dep + 1][m - p])) p++;
		if(p > m)
		{
			printf("n = %d, dep = %d, m = %d\n", n, dep, m);
			exit(0);
		}
		divide2(n / 2, dep + 1, p);
		divide2(n / 2, dep + 1, m - p);
	}
}

void solve()
{
	for(len = 1; len <= m + m; len <<= 1);
	for(int i = 0; i < len; i++) tr[i] = (tr[i >> 1] >> 1) | ((i & 1) ? (len >> 1) : 0);
	for(int i = 1; i <= m; i++) fNTT[0][i] = gNTT[0][i] = !!from[i];
	fNTT[0][0] = gNTT[0][0] = 1;
	NTT(gNTT[0], len, tr, 0);
	divide1(m / S + 1, 1);
	if(!fNTT[1][m]) { printf("impossible\n"); return; }
	divide2(m / S + 1, 1, m);
	printf("possible\n");
	for(int _ = 0; _ < 2; _++)
	{
		printf("%d %d\n", v[_].size(), _);
		for(int x : v[_]) print(x, ' ');
		putc('\n');
	}
}
} // namespace Sub2


void solve()
{
	// memset(h, idx = -1, sizeof(h));
	n = read(), m = read();
	for(int i = 1, x; i <= n; i++) x = read(), from[x] = x;
	if(from[1])
	{
		for(int i = 1; i <= m; i++) if(!from[i]) s.insert(i);
		for(int i = 1; i <= m; i++) if(from[i] == i)
		{
			int l = i, r = std::min(m, 2 * i - 2);
			// printf("[%d %d]\n", l, r);
			for(auto it = s.lower_bound(l), nxt = it; it != s.end() && *it <= r; it = nxt)
				nxt = next(it), from[*it] = i, s.erase(it);
		}
		from[1] = 0;
	}
	S = 1;
	while(S <= m && !from[S]) S++;
	if(S > m) { printf("impossible\n"); return; }
	if(S <= 500) Sub1::solve();
	else Sub2::solve();
	// Sub1::solve();
}

void init()
{
	
}

char _ED_;

void mian()
{
	debug("%.3f MB\n", abs(&_ST_ - &_ED_) / 1024.0 / 1024);
	init(); int T = 1;
	for(; T; solve(), T--);
}

#ifdef int
	#undef int
#endif
}

int main()
{
	uvu::mian(); return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 16208kb

input:

4 12
3 2 7 2

output:

possible
6 0
2 2 2 2 2 2 
6 1
2 2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #2:

score: 0
Accepted
time: 0ms
memory: 14152kb

input:

3 11
6 7 8

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #3:

score: 0
Accepted
time: 0ms
memory: 16076kb

input:

2 9
1 4

output:

possible
3 0
4 4 1 
3 1
4 1 4 

result:

ok answer is POSSIBLE

Test #4:

score: 0
Accepted
time: 1ms
memory: 16204kb

input:

2 10
1 4

output:

possible
4 0
4 4 1 1 
4 1
4 1 1 4 

result:

ok answer is POSSIBLE

Test #5:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

2 11
1 4

output:

possible
5 0
4 1 1 4 1 
5 1
1 1 4 1 4 

result:

ok answer is POSSIBLE

Test #6:

score: 0
Accepted
time: 0ms
memory: 16204kb

input:

2 12
3 4

output:

possible
4 0
3 3 3 3 
4 1
3 3 3 3 

result:

ok answer is POSSIBLE

Test #7:

score: 0
Accepted
time: 122ms
memory: 49036kb

input:

2 189874
1 189874

output:

possible
1 0
189874 
1 1
189874 

result:

ok answer is POSSIBLE

Test #8:

score: 0
Accepted
time: 29ms
memory: 20432kb

input:

2 179843
1 1

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #9:

score: 0
Accepted
time: 0ms
memory: 16204kb

input:

3 7
1 2 4

output:

possible
3 0
2 4 1 
3 1
2 1 4 

result:

ok answer is POSSIBLE

Test #10:

score: 0
Accepted
time: 59ms
memory: 31272kb

input:

300000 300000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #11:

score: 0
Accepted
time: 59ms
memory: 31144kb

input:

300000 300000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #12:

score: 0
Accepted
time: 62ms
memory: 31272kb

input:

300000 300000
2 2 1 1 2 1 1 2 2 2 1 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 1 2 2 1 2 1 2 1 2 1 1 1 1 1 2 1 2 1 2 1 2 2 1 2 1 2 2 2 1 2 1 1 1 1 2 1 2 2 2 2 2 1 2 1 1 2 2 2 1 2 2 1 2 1 1 1 2 2 2 1 2 2 1 1 2 1 2 2 2 1 2 1 1 1 2 1 2 2 2 2 1 1 1 1 1 1 1 1 2 1 2 1 1 1 2 1 1 1 2 2 1 2 1 2 2 2 1 1 2 1 1 1 1 1 2 2 ...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #13:

score: 0
Accepted
time: 1748ms
memory: 146280kb

input:

120806 299993
219665 242605 196489 186331 277859 215337 240830 212312 258288 222193 238696 291992 287565 243178 227307 212359 243062 243982 298525 180267 295381 208274 291919 271566 250838 165538 183601 298646 231570 246249 172976 265179 193891 233175 258417 180653 169469 197178 161440 271146 255749...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #14:

score: 0
Accepted
time: 1606ms
memory: 135188kb

input:

123487 299983
274588 218983 235593 203582 192968 209909 165037 172585 228069 188298 271183 271205 213471 232579 204487 257286 257790 281144 168419 155441 150356 154263 248523 272711 235890 162365 276139 249161 265773 299724 225847 189879 220499 286959 257433 248258 282185 185329 261481 260388 224291...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #15:

score: 0
Accepted
time: 1489ms
memory: 127992kb

input:

122557 299977
252461 258238 274263 253708 272420 283451 219754 264896 241541 279300 243464 245755 275323 250904 291467 275751 205697 224277 272622 178815 240411 275487 243882 248871 216365 294514 266256 268521 164510 209985 210830 184175 212724 285426 283942 227110 159947 219058 204583 261713 190783...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #16:

score: 0
Accepted
time: 1479ms
memory: 130352kb

input:

113701 299969
198302 295965 196033 289211 185097 282885 177545 261614 217340 274908 200300 267053 285061 171091 167777 182676 283275 248276 285980 251805 159368 213611 255342 259312 247168 250977 266103 155725 275792 237556 270178 202041 289375 167772 233669 240364 285824 284437 202464 224795 171587...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #17:

score: 0
Accepted
time: 1347ms
memory: 120716kb

input:

114411 299951
265802 196523 266669 197874 158705 194549 239972 202744 245245 161008 224493 157521 266818 237429 256833 280009 279959 230581 172262 279106 242994 207670 295758 192502 207775 206985 253396 285419 275188 219579 201362 262810 184971 209603 240415 251871 241508 238788 275676 221555 167370...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #18:

score: 0
Accepted
time: 5ms
memory: 14928kb

input:

149996 299993
236442 50199 175480 163131 30462 297100 203895 260089 254734 111945 25605 177654 1149 270337 217515 103362 110298 252018 271894 277866 272176 141138 94302 274222 299404 219462 265107 187282 169348 191127 196072 33228 215113 207679 272997 113703 165430 142773 190374 204811 249579 276886...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #19:

score: 0
Accepted
time: 5ms
memory: 14928kb

input:

149975 299951
200407 45267 284068 215154 175845 254883 84663 231429 217905 112530 158784 205288 210556 157486 208404 114693 289888 172617 195936 125796 37500 292444 66555 297831 102330 212436 13995 137436 279786 277714 108042 178057 245965 40185 217237 165969 68979 19566 259014 284959 230041 152571 ...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #20:

score: 0
Accepted
time: 4ms
memory: 14280kb

input:

15722 38993
24734 24697 32300 36794 25889 35678 19794 23383 23183 24325 33135 38275 36666 35513 38689 34076 33146 31716 22998 22054 29483 26786 22227 20321 34952 36427 27243 36597 23556 27443 36797 24322 30591 32354 32410 32738 25126 33880 31270 24013 33501 28401 22935 38890 29587 33532 31515 27382 ...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #21:

score: 0
Accepted
time: 6ms
memory: 14288kb

input:

19864 50789
28222 43743 27179 50254 37427 47182 50480 47326 36563 30074 46358 43254 47236 42619 31006 49557 28571 48758 40769 47650 30371 28864 44863 48265 31007 33271 49556 45608 45765 45829 44931 47830 25609 50541 27282 49477 33955 31737 43369 33386 33185 45749 35355 31227 45944 28386 37730 40388 ...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #22:

score: 0
Accepted
time: 783ms
memory: 134488kb

input:

71057 182851
112443 151542 149850 142337 182151 105729 109710 146979 138042 144644 180922 168476 169906 142012 100333 141189 126969 155737 163064 172879 126855 146873 170867 135506 98790 135328 155367 138318 116850 170349 174172 131652 167606 179985 108145 180401 154986 152718 170716 141019 126962 1...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #23:

score: 0
Accepted
time: 140ms
memory: 46028kb

input:

95522 199933
190778 69374 121781 80428 110028 89699 131628 158865 99064 133595 104147 87571 56640 78254 178981 96712 193475 180928 109533 115666 102159 145239 125846 152465 71331 175432 180403 123067 105394 172383 185136 162928 84280 73056 192897 122025 182530 146531 116258 85224 197872 138511 16731...

output:

possible
2 0
49984 149949 
2 1
49984 149949 

result:

ok answer is POSSIBLE

Test #24:

score: 0
Accepted
time: 147ms
memory: 48088kb

input:

146663 199999
170875 116312 110371 69177 113865 57717 150200 94082 134323 73466 58443 132478 132425 101481 169927 66117 151952 174517 184528 75786 171601 177859 98992 77371 193541 183957 125126 189634 103016 170044 159042 120742 148104 165372 113326 61150 198160 138763 160728 177668 190735 69112 777...

output:

possible
1 0
199999 
1 1
199999 

result:

ok answer is POSSIBLE

Test #25:

score: 0
Accepted
time: 149ms
memory: 46128kb

input:

145966 199967
95818 81092 128076 152382 60734 64613 173917 78121 146877 108664 153100 58124 87791 137875 152978 189794 92379 112769 80374 52662 194121 51914 101508 56209 110411 140029 141034 124508 155830 119781 158522 79638 63913 80676 139226 159365 199423 134067 120529 139639 136153 136521 60226 9...

output:

possible
1 0
199967 
1 1
199967 

result:

ok answer is POSSIBLE

Test #26:

score: 0
Accepted
time: 145ms
memory: 46404kb

input:

121946 199933
198637 73613 151232 169836 86000 153721 65769 137183 50728 82574 60902 63082 166629 87750 55402 83993 88300 55231 168677 157132 120221 173268 191003 110975 81272 120971 142716 117553 74264 87197 162629 84686 155035 179539 119802 62572 166200 195315 137484 72968 114343 116708 189471 818...

output:

possible
1 0
199933 
1 1
199933 

result:

ok answer is POSSIBLE

Test #27:

score: 0
Accepted
time: 202ms
memory: 55944kb

input:

52773 199961
152323 89770 105214 146704 61977 176684 102785 183152 159085 172263 65457 69235 178486 99415 93034 125331 121829 85870 63910 104332 179334 62078 175286 109581 190232 99259 58373 69311 126173 50347 180275 145925 100324 131457 159829 97320 91139 75776 92127 166953 199199 133886 120412 196...

output:

possible
1 0
199961 
1 1
199961 

result:

ok answer is POSSIBLE

Test #28:

score: 0
Accepted
time: 373ms
memory: 78616kb

input:

13 143363
11520 6144 12096 9216 12276 12264 10752 12282 12285 11904 12240 12192 4096

output:

possible
14 0
4096 4096 6144 9216 10752 11520 11904 12096 12192 12240 12264 12276 12282 12285 
14 1
4096 4096 6144 9216 10752 11520 11904 12096 12192 12240 12264 12276 12282 12285 

result:

ok answer is POSSIBLE

Test #29:

score: 0
Accepted
time: 161ms
memory: 57760kb

input:

12 65539
6048 5376 6132 5952 6138 5760 6120 3072 2048 4608 6141 6096

output:

possible
13 0
2048 2048 3072 4608 5376 5760 5952 6048 6096 6120 6132 6138 6141 
13 1
2048 2048 3072 4608 5376 5760 5952 6048 6096 6120 6132 6138 6141 

result:

ok answer is POSSIBLE

Test #30:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

3 23
9 4 6

output:

possible
4 0
4 4 9 6 
4 1
4 4 9 6 

result:

ok answer is POSSIBLE

Test #31:

score: 0
Accepted
time: 0ms
memory: 16212kb

input:

18 99
66 44 63 46 39 41 43 42 59 51 33 62 65 35 49 45 61 47

output:

possible
3 0
33 33 33 
3 1
33 33 33 

result:

ok answer is POSSIBLE

Test #32:

score: 0
Accepted
time: 308ms
memory: 54480kb

input:

50001 300000
179815 107220 141689 185608 138614 106561 189944 102113 175534 112845 150657 198870 148115 146379 106927 156746 145402 126850 143194 177571 100117 115764 115887 104290 133650 103581 100362 110481 111184 154037 113702 180326 146143 152934 187083 117609 105408 184818 138456 145427 107000 ...

output:

possible
2 0
100000 200000 
2 1
100000 200000 

result:

ok answer is POSSIBLE

Test #33:

score: 0
Accepted
time: 319ms
memory: 54248kb

input:

50001 299997
149641 170891 177911 119044 181293 172197 132984 138663 143759 134288 107688 153141 184043 154488 102817 186753 190146 147263 179981 153867 113100 144225 117794 118795 128437 135177 168305 135226 108849 102161 198676 193809 184788 121617 148561 132193 158618 180490 181255 100030 175866 ...

output:

possible
2 0
99999 199998 
2 1
99999 199998 

result:

ok answer is POSSIBLE

Test #34:

score: 0
Accepted
time: 320ms
memory: 54192kb

input:

50000 299994
179742 105899 107917 102430 134730 167704 120044 141394 158033 176811 135491 147290 114571 144196 145332 174711 193032 156138 124454 136838 130318 162557 114150 108228 129639 143132 138993 114984 159101 101188 153249 113202 144092 150532 122447 116870 114793 135417 108000 109705 137481 ...

output:

possible
2 0
99998 199996 
2 1
99998 199996 

result:

ok answer is POSSIBLE

Test #35:

score: 0
Accepted
time: 143ms
memory: 46012kb

input:

26037 156213
93089 61781 63637 79971 95304 55788 101236 70480 75657 81105 80013 55133 70485 55787 96713 101484 72276 78528 72841 56155 56166 73220 55573 99345 56179 73187 71534 60842 75339 63295 82435 90430 81451 70189 66316 76019 63356 61721 87440 55094 54059 57576 59515 103058 90764 69293 88717 69...

output:

possible
2 0
52071 104142 
2 1
52071 104142 

result:

ok answer is POSSIBLE

Test #36:

score: 0
Accepted
time: 140ms
memory: 46224kb

input:

29720 178311
61628 72977 88645 82861 83820 101181 103054 77150 62300 60166 112979 64366 77201 82696 98104 74450 60069 92668 86565 67990 71776 63536 92869 70074 88167 73429 67104 74689 67409 60226 116666 68806 68072 71706 80615 91716 62594 86001 61832 81888 75564 80211 68425 76337 75483 83925 60419 1...

output:

possible
2 0
59437 118874 
2 1
59437 118874 

result:

ok answer is POSSIBLE

Test #37:

score: 0
Accepted
time: 1487ms
memory: 128152kb

input:

136339 299977
214756 231452 293630 106187 157182 171124 228113 144725 169945 237718 296851 245042 159423 217513 139855 265316 157214 233965 122526 272867 238783 190687 273904 298626 246662 157568 152606 268271 294433 126880 189499 208826 166355 120463 244865 153800 106042 180372 299547 254431 255427...

output:

possible
2 0
100002 199975 
2 1
100002 199975 

result:

ok answer is POSSIBLE

Test #38:

score: 0
Accepted
time: 1220ms
memory: 112480kb

input:

149506 299969
174447 217864 180470 254941 250370 190891 190619 137151 127459 167716 268743 277053 129906 157065 248983 237024 139038 186025 273283 225904 156606 188417 286658 205669 133840 143462 262804 131612 115517 284766 221226 241905 110789 110425 249899 175816 197927 106931 257830 255134 249134...

output:

possible
2 0
99994 199975 
2 1
99994 199975 

result:

ok answer is POSSIBLE

Test #39:

score: 0
Accepted
time: 1482ms
memory: 129284kb

input:

153857 299951
290558 219603 162983 228851 142647 219491 100675 259088 199178 181781 245294 196052 244036 232020 205330 192751 231850 270160 208461 291363 194042 259737 197037 146590 299400 115957 100216 148910 285052 170549 173531 112913 205622 149682 137875 248281 196730 281174 190164 257309 210132...

output:

possible
2 0
100003 199948 
2 1
100003 199948 

result:

ok answer is POSSIBLE

Test #40:

score: 0
Accepted
time: 2ms
memory: 14160kb

input:

7802 115201
11571 107519 16211 8439 10643 59044 34655 35003 45878 58799 114769 55071 75938 27827 43661 29522 66107 67512 87609 49577 24418 42282 31046 9325 99905 105286 81606 49039 53086 7179 95049 69136 82144 85550 87596 63236 64251 74227 47315 47995 62569 83810 56550 11152 22098 77256 48517 64802 ...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #41:

score: 0
Accepted
time: 3ms
memory: 14156kb

input:

14464 213553
160979 186966 206512 117247 23026 182642 100340 60175 197203 192592 126878 59337 67338 134534 191139 176813 197577 190939 155298 105186 13137 190069 65192 130967 23377 195463 17606 51101 87496 187166 54752 84767 129024 43909 27872 209003 143843 186270 51620 167620 76215 74533 109971 152...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #42:

score: 0
Accepted
time: 1ms
memory: 12112kb

input:

8769 17539
15958 10138 6784 6056 7196 10372 9054 7536 3494 14556 7976 12296 13934 14826 130 3658 4010 17476 15420 1024 236 5860 4536 9378 2240 17310 3162 5752 15990 12668 16070 9510 10792 3154 15454 3142 16130 9446 13798 10950 3246 8564 2638 12524 5040 5394 15766 1448 6004 5942 17080 7616 7534 15736...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #43:

score: 0
Accepted
time: 1491ms
memory: 127564kb

input:

149996 299993
258200 241764 297030 175922 161486 220716 246103 283389 290081 288485 281655 163497 277698 158313 193704 281750 223627 264626 242920 219775 256088 219634 210105 260236 254756 267310 272106 196811 235519 170334 292713 277352 165286 270866 170874 173366 258020 207881 239147 182604 156838...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #44:

score: 0
Accepted
time: 1481ms
memory: 127040kb

input:

149991 299983
240096 271211 269047 207120 246685 256691 176626 161412 163415 271547 175074 298586 202443 277396 224552 159161 290332 263918 284489 260980 273101 196202 275140 238415 161272 266408 267218 265569 273283 254292 276055 253589 172159 274414 182205 207003 197968 173082 262499 205736 159978...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #45:

score: 0
Accepted
time: 1478ms
memory: 128828kb

input:

149988 299977
227063 299905 238576 197212 264411 186758 231173 241943 289186 226737 176308 274668 206005 232380 241389 165549 172889 173712 166269 298470 198594 241078 268450 171733 234758 165872 275652 195989 272643 232933 251843 200261 268580 290913 170450 176926 198166 245583 265990 278297 188896...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #46:

score: 0
Accepted
time: 1472ms
memory: 129892kb

input:

149984 299969
172027 235846 281700 286278 167186 283066 266989 227301 188992 296081 264916 234440 176471 262189 161052 250697 235125 273693 178626 178806 249240 254835 199116 172572 261387 201364 290885 189367 211193 176152 245448 223000 269678 219651 288883 262134 161354 157537 156694 165142 151135...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #47:

score: 0
Accepted
time: 1482ms
memory: 129316kb

input:

149975 299951
188650 256797 240317 212207 274286 221948 252276 187935 244576 298558 290717 299779 227397 210366 219502 288436 272362 281004 157625 175483 210514 283398 200890 255236 230920 260814 247726 231842 180861 277541 195547 217508 201967 163948 293138 150607 282159 210332 203754 217416 216410...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #48:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

2 10
1 2

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #49:

score: 0
Accepted
time: 1ms
memory: 16212kb

input:

2 10
2 4

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #50:

score: 0
Accepted
time: 0ms
memory: 14164kb

input:

2 8
2 4

output:

possible
4 0
2 2 2 2 
4 1
2 2 2 2 

result:

ok answer is POSSIBLE

Test #51:

score: 0
Accepted
time: 1ms
memory: 16008kb

input:

2 10
10 5

output:

possible
2 0
5 5 
2 1
5 5 

result:

ok answer is POSSIBLE

Test #52:

score: 0
Accepted
time: 0ms
memory: 14156kb

input:

1 10
10

output:

possible
1 0
10 
1 1
10 

result:

ok answer is POSSIBLE

Test #53:

score: 0
Accepted
time: 1ms
memory: 16208kb

input:

2 10
1 3

output:

possible
4 0
3 3 3 1 
4 1
3 3 1 3 

result:

ok answer is POSSIBLE

Test #54:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

2 10
2 3

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #55:

score: 0
Accepted
time: 0ms
memory: 14164kb

input:

2 10
2 5

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #56:

score: 0
Accepted
time: 0ms
memory: 16080kb

input:

2 16
2 6

output:

possible
8 0
2 2 2 2 2 2 2 2 
8 1
2 2 2 2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #57:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

3 25
2 4 17

output:

possible
5 0
2 2 2 2 17 
5 1
2 2 2 2 17 

result:

ok answer is POSSIBLE

Test #58:

score: 0
Accepted
time: 1ms
memory: 16076kb

input:

3 16
2 4 8

output:

possible
8 0
2 2 2 2 2 2 2 2 
8 1
2 2 2 2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #59:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

2 10
2 2

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #60:

score: 0
Accepted
time: 0ms
memory: 16204kb

input:

2 10
2 7

output:

possible
5 0
2 2 2 2 2 
5 1
2 2 2 2 2 

result:

ok answer is POSSIBLE

Test #61:

score: 0
Accepted
time: 0ms
memory: 14164kb

input:

2 10
5 7

output:

possible
2 0
5 5 
2 1
5 5 

result:

ok answer is POSSIBLE

Test #62:

score: 0
Accepted
time: 0ms
memory: 14036kb

input:

9 48
5 21 46 48 18 47 24 7 20

output:

possible
7 0
5 5 5 5 5 5 18 
7 1
5 5 5 5 5 5 18 

result:

ok answer is POSSIBLE

Test #63:

score: 0
Accepted
time: 2ms
memory: 16208kb

input:

5 33
11 4 20 33 7

output:

possible
6 0
4 4 4 7 7 7 
6 1
4 4 4 7 7 7 

result:

ok answer is POSSIBLE

Test #64:

score: 0
Accepted
time: 0ms
memory: 16160kb

input:

4 37
14 7 5 10

output:

possible
7 0
5 5 5 5 5 5 7 
7 1
5 5 5 5 5 5 7 

result:

ok answer is POSSIBLE

Test #65:

score: 0
Accepted
time: 0ms
memory: 16204kb

input:

4 13
13 3 2 5

output:

possible
6 0
2 2 2 2 2 3 
6 1
2 2 2 2 2 3 

result:

ok answer is POSSIBLE

Test #66:

score: 0
Accepted
time: 1ms
memory: 16208kb

input:

6 31
10 23 26 6 17 7

output:

possible
5 0
6 6 6 6 7 
5 1
6 6 6 6 7 

result:

ok answer is POSSIBLE

Test #67:

score: 0
Accepted
time: 12ms
memory: 20412kb

input:

284109 299993
82693 280588 235179 246205 279889 25639 275918 192095 249990 143986 267139 134112 36847 270746 185742 73892 175684 39090 259436 1649 202965 253305 223885 275398 104340 212864 61536 79747 199063 14964 292371 79728 5457 108888 149666 46088 247423 47231 231141 100012 67182 47664 42637 235...

output:

possible
149996 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #68:

score: 0
Accepted
time: 35ms
memory: 21972kb

input:

176987 299983
134337 188833 86249 147572 50563 209738 67494 193688 110400 77021 285781 254505 137778 150729 211183 49998 138192 19427 63056 264604 245646 297752 185588 148733 61882 147502 283830 180576 217970 186522 228681 213096 69782 245717 149164 267331 158819 298634 165601 132292 38414 119061 29...

output:

possible
99995 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #69:

score: 0
Accepted
time: 8ms
memory: 18252kb

input:

101956 299977
173599 8578 141147 246767 6862 22749 84567 238563 134947 176705 63664 70703 61774 126443 111246 111191 215612 243366 143452 148008 111982 271511 251508 273697 24435 290849 171887 236176 173666 164885 105884 231046 32299 150585 280448 208325 275707 260259 219277 123082 286048 242639 187...

output:

possible
149988 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #70:

score: 0
Accepted
time: 10ms
memory: 18352kb

input:

127817 299969
229594 66803 106469 106835 119120 139974 102981 144376 258146 242498 152146 186923 288220 122379 15906 76102 213436 25976 78581 175732 81415 7967 31396 74369 231066 250352 14272 139116 222738 206441 59066 155835 143792 281142 152751 24667 215555 270137 247437 248474 53161 4193 56759 10...

output:

possible
149981 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #71:

score: 0
Accepted
time: 19ms
memory: 21120kb

input:

240417 299951
192283 42192 253425 2123 225790 138791 188657 102501 21586 206782 296989 112114 34734 102756 9298 178839 222603 178631 174878 175889 22867 88977 165214 142061 11700 93744 230251 128876 201644 63991 5227 183102 266506 94612 63108 242564 74540 70537 285399 154815 264317 236978 286017 278...

output:

possible
149974 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #72:

score: 0
Accepted
time: 190ms
memory: 43392kb

input:

149999 300000
180350 292018 224507 167951 173853 230803 215651 297321 294493 280207 232320 182041 199235 290120 156041 293063 297842 229136 230569 163540 184200 189540 239130 171845 255034 186516 153179 204255 272038 205097 242278 157493 220725 167528 171721 289725 202469 181368 190581 238982 189956...

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #73:

score: 0
Accepted
time: 316ms
memory: 51068kb

input:

150000 300000
154660 289247 299925 156037 168696 223367 271459 284130 153212 278922 151736 272730 193066 192396 284074 166226 297232 236481 177033 223098 293746 289581 236296 194345 204399 277077 164776 193674 226295 169123 293920 256237 194408 258367 267676 236520 276043 225281 201289 244099 174855...

output:

possible
2 0
150000 150000 
2 1
150000 150000 

result:

ok answer is POSSIBLE

Test #74:

score: 0
Accepted
time: 319ms
memory: 56976kb

input:

199999 300000
234124 130763 113688 108428 209162 205392 270579 227532 191402 129655 296393 179411 193791 106985 231041 149372 265673 279806 106033 267181 185616 203016 197006 182142 152330 174839 172588 191508 109240 290648 286327 259234 114556 151362 223192 294839 227154 121645 165338 163786 119097...

output:

possible
2 0
100001 199999 
2 1
100001 199999 

result:

ok answer is POSSIBLE

Test #75:

score: 0
Accepted
time: 321ms
memory: 51780kb

input:

200000 300000
277658 273549 119962 147492 202889 154194 205617 248099 112066 222682 271043 173437 122291 100532 248581 285966 108090 167000 140375 216747 183806 143874 295761 260715 293349 253328 121160 185075 273135 280618 269688 291340 160511 196603 130094 129666 261025 155992 122074 102037 111053...

output:

possible
2 0
100000 200000 
2 1
100000 200000 

result:

ok answer is POSSIBLE

Test #76:

score: 0
Accepted
time: 236ms
memory: 50812kb

input:

150000 300000
271744 225762 234594 174197 262184 170539 278263 220281 278694 186593 255412 222827 290800 180753 174647 271910 281356 248303 156309 214084 200911 249506 262696 178094 290541 218885 229163 252464 278405 276717 249857 189805 227714 177311 239302 171272 174616 184619 228775 192382 261049...

output:

possible
150000 0
150001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #77:

score: 0
Accepted
time: 361ms
memory: 59600kb

input:

200000 300000
251477 150558 186597 213004 163014 200060 205321 281961 191556 135359 151138 290725 212028 172724 139992 299147 157843 147495 206298 115931 277350 265460 185157 295759 120191 227059 208996 191376 131744 281512 283536 127484 173794 188106 189299 171142 268028 278635 113063 297188 133675...

output:

possible
150000 0
150001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #78:

score: 0
Accepted
time: 5ms
memory: 16612kb

input:

150000 300000
284031 212560 208798 195758 296373 157274 281197 242384 182962 151165 165832 281962 254315 299466 206537 245143 291176 230479 241401 273312 247159 288602 230779 187258 182211 224463 229453 165858 296355 294591 197407 183718 170273 266602 237546 247506 224948 269539 271162 248178 272639...

output:

possible
13637 0
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 1...

result:

ok answer is POSSIBLE

Test #79:

score: 0
Accepted
time: 8ms
memory: 16892kb

input:

200000 300000
171572 167775 206181 252302 230524 226122 136132 108942 101006 250441 124711 225664 159862 154835 125022 120721 149203 198492 150004 236590 138487 298661 157878 215208 134883 288882 202459 113652 230024 196329 203540 142947 145480 195708 168402 246935 298121 123624 166246 224546 171484...

output:

possible
18182 0
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 1...

result:

ok answer is POSSIBLE

Test #80:

score: 0
Accepted
time: 33ms
memory: 16532kb

input:

150000 300000
205067 263596 174332 174736 173580 221067 156801 226467 191502 297347 173471 219984 204203 220165 213908 298323 151191 193437 194771 235586 197214 274447 151125 156738 175324 179935 152813 288795 274604 199533 158614 290170 203190 295000 257020 252721 161432 196953 217254 158613 176085...

output:

possible
1402 0
107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 ...

result:

ok answer is POSSIBLE

Test #81:

score: 0
Accepted
time: 41ms
memory: 16732kb

input:

200000 300000
188780 261439 225961 233969 295513 262991 194146 170253 132786 113750 168219 155103 227903 134575 257488 147394 222904 199817 108849 261706 227998 178084 243035 108745 256594 106165 206382 124076 283635 198492 178691 288392 151123 197441 101351 133788 194898 297229 240951 282827 288322...

output:

possible
1870 0
107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 ...

result:

ok answer is POSSIBLE

Test #82:

score: 0
Accepted
time: 448ms
memory: 61444kb

input:

150000 300000
175748 157438 211695 211585 178437 230027 231380 248838 247608 167571 277145 160284 289148 257811 203984 215754 245102 182245 283325 289424 266135 286168 159353 287797 184550 207339 225704 205588 256617 287858 202262 171081 239927 219722 273421 231708 218861 235287 244962 186149 161472...

output:

possible
2 0
53139 246861 
2 1
53139 246861 

result:

ok answer is POSSIBLE

Test #83:

score: 0
Accepted
time: 447ms
memory: 61444kb

input:

200000 300000
151560 128354 245236 265119 236725 119075 237378 177825 289334 130341 276864 237249 290921 275541 269595 133580 181440 157305 125815 166882 222730 163086 244930 264753 282109 197524 263161 184256 118435 157386 284383 130937 204242 299180 241583 277280 249687 279388 176134 207174 274684...

output:

possible
2 0
41246 258754 
2 1
41246 258754 

result:

ok answer is POSSIBLE

Test #84:

score: 0
Accepted
time: 366ms
memory: 66764kb

input:

2 300000
1 150000

output:

possible
2 0
150000 150000 
2 1
150000 150000 

result:

ok answer is POSSIBLE

Test #85:

score: 0
Accepted
time: 239ms
memory: 55748kb

input:

2 299999
1 150000

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #86:

score: 0
Accepted
time: 58ms
memory: 29224kb

input:

2 300000
1 2

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #87:

score: 0
Accepted
time: 55ms
memory: 28212kb

input:

2 299999
1 2

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #88:

score: 0
Accepted
time: 47ms
memory: 29272kb

input:

5 262144
1 2 4 8 16

output:

possible
131072 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #89:

score: 0
Accepted
time: 51ms
memory: 29348kb

input:

5 262144
1 2 8 16 32

output:

possible
131072 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #90:

score: 0
Accepted
time: 4ms
memory: 16852kb

input:

5 262144
2 4 8 16 32

output:

possible
131072 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #91:

score: 0
Accepted
time: 3ms
memory: 17132kb

input:

2 300000
2 3

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #92:

score: 0
Accepted
time: 57ms
memory: 30880kb

input:

2 300000
1 3

output:

possible
100000 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...

result:

ok answer is POSSIBLE

Test #93:

score: 0
Accepted
time: 4ms
memory: 17132kb

input:

3 300000
2 3 6

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #94:

score: 0
Accepted
time: 3ms
memory: 15064kb

input:

4 300000
2 3 5 30

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #95:

score: 0
Accepted
time: 3ms
memory: 15072kb

input:

6 297990
2 3 5 7 11 2310

output:

possible
148995 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #96:

score: 0
Accepted
time: 58ms
memory: 31244kb

input:

3 300000
1 2 3

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #97:

score: 0
Accepted
time: 56ms
memory: 30268kb

input:

18 300000
128 32 256 65536 131072 32768 2048 512 16384 64 2 4096 8192 16 1024 1 8 4

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #98:

score: 0
Accepted
time: 1ms
memory: 16692kb

input:

17 219506
64 512 256 131072 32768 16384 65536 1024 128 4 4096 8192 32 2048 2 16 8

output:

possible
109753 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #99:

score: 0
Accepted
time: 3ms
memory: 17076kb

input:

18 287063
129 33 257 65537 131073 32769 2049 513 16385 65 3 4097 8193 17 1025 2 9 5

output:

possible
143531 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #100:

score: 0
Accepted
time: 42ms
memory: 26492kb

input:

17 219506
63 511 255 131071 32767 16383 65535 1023 127 3 4095 8191 31 2047 1 15 7

output:

possible
73168 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #101:

score: 0
Accepted
time: 2ms
memory: 16664kb

input:

10 300000
81 19683 6561 243 2187 27 729 3 59049 9

output:

possible
100000 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...

result:

ok answer is POSSIBLE

Test #102:

score: 0
Accepted
time: 3ms
memory: 16700kb

input:

10 285738
81 19683 6561 243 2187 27 729 3 59049 9

output:

possible
95246 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #103:

score: 0
Accepted
time: 33ms
memory: 23992kb

input:

159 166320
1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 18 20 21 22 24 27 28 30 33 35 36 40 42 44 45 48 54 55 56 60 63 66 70 72 77 80 84 88 90 99 105 108 110 112 120 126 132 135 140 144 154 165 168 176 180 189 198 210 216 220 231 240 252 264 270 280 297 308 315 330 336 360 378 385 396 420 432 440 462 495 504...

output:

possible
83160 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #104:

score: 0
Accepted
time: 13ms
memory: 20416kb

input:

300000 300000
77594 177814 220426 149616 231195 97308 181403 12698 280437 252430 175196 152774 56265 292525 9757 286046 82553 239190 34752 95207 193649 852 277828 77249 18296 58038 15746 244334 61944 48227 281485 18555 36515 197843 116323 258617 218317 142419 36516 156913 279075 152520 70297 249565 ...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #105:

score: 0
Accepted
time: 12ms
memory: 20416kb

input:

299999 300000
193073 60655 142223 92675 191086 253723 144311 240589 168113 275076 247158 295733 135857 261221 64856 207850 165437 287853 43928 35905 227873 249120 228461 140431 204074 74356 276048 214321 185949 298294 191523 197314 158505 7466 82596 206788 280507 114917 273635 213227 105529 32214 13...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #106:

score: 0
Accepted
time: 13ms
memory: 20412kb

input:

299999 300000
297039 191471 270789 158799 40141 298632 185971 67353 190178 136633 207998 183086 249499 120118 128135 32332 257628 237994 186781 39588 25363 267432 97065 210556 274415 66457 71880 225249 248562 212434 285239 194357 179614 37406 84646 228552 293732 146374 8183 289541 266572 264184 2659...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #107:

score: 0
Accepted
time: 14ms
memory: 20284kb

input:

299998 300000
171219 220362 166731 168410 96001 190402 185116 266576 274630 5604 238639 138827 185061 295375 248889 4407 204807 39307 213856 148835 185263 95112 215033 136325 283248 270030 153590 95634 134242 244255 132467 291618 2616 138823 162197 28701 11309 28245 250659 240865 267521 192931 27519...

output:

possible
150000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #108:

score: 0
Accepted
time: 0ms
memory: 12068kb

input:

1 1
1

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #109:

score: 0
Accepted
time: 0ms
memory: 12104kb

input:

2 1
1 1

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #110:

score: 0
Accepted
time: 0ms
memory: 12108kb

input:

1 3
2

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #111:

score: 0
Accepted
time: 0ms
memory: 12108kb

input:

2 3
1 1

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #112:

score: 0
Accepted
time: 0ms
memory: 14152kb

input:

1 4
3

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #113:

score: 0
Accepted
time: 1ms
memory: 14152kb

input:

2 5
2 4

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #114:

score: 0
Accepted
time: 1ms
memory: 16208kb

input:

8 31
16 20 2 26 3 11 23 15

output:

possible
15 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 
15 1
2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 

result:

ok answer is POSSIBLE

Test #115:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

9 45
45 20 29 43 40 13 44 39 34

output:

possible
1 0
45 
1 1
45 

result:

ok answer is POSSIBLE

Test #116:

score: 0
Accepted
time: 1ms
memory: 14036kb

input:

2 16
9 8

output:

possible
2 0
8 8 
2 1
8 8 

result:

ok answer is POSSIBLE

Test #117:

score: 0
Accepted
time: 0ms
memory: 11976kb

input:

7 35
9 34 15 23 24 28 18

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #118:

score: 0
Accepted
time: 1ms
memory: 14028kb

input:

1 23
10

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #119:

score: 0
Accepted
time: 0ms
memory: 16212kb

input:

8 24
22 4 3 14 15 24 7 10

output:

possible
8 0
3 3 3 3 3 3 3 3 
8 1
3 3 3 3 3 3 3 3 

result:

ok answer is POSSIBLE

Test #120:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

9 25
5 16 6 18 24 12 10 9 22

output:

possible
5 0
5 5 5 5 5 
5 1
5 5 5 5 5 

result:

ok answer is POSSIBLE

Test #121:

score: 0
Accepted
time: 0ms
memory: 16056kb

input:

4 13
11 6 1 3

output:

possible
5 0
3 3 3 3 1 
5 1
3 3 3 1 3 

result:

ok answer is POSSIBLE

Test #122:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

4 15
14 7 8 6

output:

possible
2 0
8 7 
2 1
8 7 

result:

ok answer is POSSIBLE

Test #123:

score: 0
Accepted
time: 0ms
memory: 14028kb

input:

9 15
8 13 2 14 11 5 6 1 9

output:

possible
6 0
2 2 2 2 2 5 
6 1
2 2 2 2 2 5 

result:

ok answer is POSSIBLE

Test #124:

score: 0
Accepted
time: 1ms
memory: 14156kb

input:

3 43
40 14 26

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #125:

score: 0
Accepted
time: 0ms
memory: 14164kb

input:

3 40
31 9 23

output:

possible
2 0
9 31 
2 1
9 31 

result:

ok answer is POSSIBLE

Test #126:

score: 0
Accepted
time: 1ms
memory: 16076kb

input:

4 44
14 3 23 19

output:

possible
11 0
3 3 3 3 3 3 3 3 3 3 14 
11 1
3 3 3 3 3 3 3 3 3 3 14 

result:

ok answer is POSSIBLE

Test #127:

score: 0
Accepted
time: 0ms
memory: 16212kb

input:

2 19
14 19

output:

possible
1 0
19 
1 1
19 

result:

ok answer is POSSIBLE

Test #128:

score: 0
Accepted
time: 0ms
memory: 16084kb

input:

4 15
3 11 15 10

output:

possible
5 0
3 3 3 3 3 
5 1
3 3 3 3 3 

result:

ok answer is POSSIBLE

Test #129:

score: 0
Accepted
time: 0ms
memory: 16208kb

input:

4 4
3 1 4 2

output:

possible
2 0
2 2 
2 1
2 2 

result:

ok answer is POSSIBLE

Test #130:

score: 0
Accepted
time: 1ms
memory: 14156kb

input:

2 3
1 2

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #131:

score: 0
Accepted
time: 0ms
memory: 14156kb

input:

2 9
1 5

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #132:

score: 0
Accepted
time: 0ms
memory: 22512kb

input:

2 3043
1 1522

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #133:

score: 0
Accepted
time: 1ms
memory: 22536kb

input:

2 3105
1 1553

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #134:

score: 0
Accepted
time: 11ms
memory: 24224kb

input:

2 29105
1 14553

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #135:

score: 0
Accepted
time: 21ms
memory: 24980kb

input:

2 37107
1 18554

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #136:

score: 0
Accepted
time: 0ms
memory: 16204kb

input:

3 9
1 5 2

output:

possible
3 0
2 2 5 
3 1
2 2 5 

result:

ok answer is POSSIBLE

Test #137:

score: 0
Accepted
time: 1778ms
memory: 157308kb

input:

120807 299993
219665 242605 196488 169476 277859 215336 240830 202356 258288 222193 238696 291992 287565 243178 227307 212358 243062 243982 298525 177451 295381 208273 291919 271566 250838 165536 155491 298646 231570 246249 172975 265179 193890 233175 258417 180652 175350 197177 161438 271146 255749...

output:

possible
149996 0
149998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #138:

score: 0
Accepted
time: 1647ms
memory: 148604kb

input:

123488 299983
274588 198429 235593 203581 192966 155340 165035 172583 228069 217763 271183 271205 213470 232579 204485 257286 257790 281144 168418 155440 171847 154262 248523 272711 235890 162363 276139 249161 265773 299724 225847 215194 192373 286959 257433 248258 282185 185328 261481 260388 224291...

output:

possible
149989 0
149995 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #139:

score: 0
Accepted
time: 1519ms
memory: 136652kb

input:

122558 299977
208413 271134 274263 253707 269848 283451 196062 264895 266032 279300 243463 245754 275323 259844 291467 275751 205696 180711 259734 267730 256780 275487 243881 259267 199610 294514 253409 225983 212552 209983 246065 214317 250106 285426 283942 205047 159504 267669 204582 266851 230661...

output:

possible
149988 0
149990 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #140:

score: 0
Accepted
time: 1522ms
memory: 140068kb

input:

113702 299969
278076 184594 224534 280981 295760 274370 163560 277610 194363 211148 207190 284240 217491 245891 167771 196919 208586 209716 281208 293773 292014 263156 184364 274831 275608 246209 288022 249062 283874 159775 227299 247666 192197 180935 212655 299548 289856 285846 220733 286188 234343...

output:

possible
149984 0
149986 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #141:

score: 0
Accepted
time: 1396ms
memory: 129976kb

input:

114412 299951
265802 196523 266669 197874 158704 194549 239972 202744 245245 161281 224493 157517 266818 237429 256833 280009 279959 230581 172262 279106 242994 207670 295758 192502 207775 206985 253396 285419 275188 219579 201362 262810 184971 209603 240415 251871 241508 238788 275676 221555 167370...

output:

possible
149973 0
149979 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #142:

score: 0
Accepted
time: 35ms
memory: 23232kb

input:

149997 299993
236442 50199 175483 163131 30462 233086 203895 260092 254737 111945 25605 177654 1149 274699 217515 103362 110298 252018 271897 277866 227287 141138 94302 274225 299407 219462 265107 187285 169351 191127 196075 33228 215116 207682 272997 113703 266392 142773 190374 272593 249579 253876...

output:

possible
99998 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #143:

score: 0
Accepted
time: 43ms
memory: 25344kb

input:

104995 299983
48685 229292 139620 176210 108497 272575 286100 173212 56110 280055 114240 248875 228685 33875 160167 216110 182130 230257 162592 33640 84880 196122 81315 183042 50315 81192 52765 217692 166457 149825 50905 34715 83017 148872 144935 52565 22625 88380 206560 93255 143680 233227 110247 2...

output:

possible
59999 0
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5...

result:

ok answer is POSSIBLE

Test #144:

score: 0
Accepted
time: 36ms
memory: 23240kb

input:

149989 299977
45984 225729 114051 63876 187104 180041 238101 223283 158643 210920 184697 297104 89373 161039 181425 292035 221786 74850 156887 181008 72798 228704 177027 239433 190275 237825 232199 70344 236219 142281 21195 167097 191118 56643 95907 151770 173745 51732 161306 162911 50118 286611 196...

output:

possible
99993 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #145:

score: 0
Accepted
time: 42ms
memory: 25340kb

input:

104989 299969
109941 155615 209765 221966 31285 40130 274196 154526 91066 156475 87825 93241 96275 278576 111630 237266 220030 147561 246010 147220 108396 285481 280965 262000 80085 20030 124720 107840 74560 92630 188566 191645 173536 254105 205941 50705 246416 151665 67550 148776 60065 135730 20984...

output:

possible
59996 0
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5...

result:

ok answer is POSSIBLE

Test #146:

score: 0
Accepted
time: 35ms
memory: 23228kb

input:

149976 299951
200410 45267 284071 215154 175845 254883 84663 231429 217905 112530 158784 232249 218986 157486 208404 114693 289891 172617 195936 125796 37500 292447 66555 297831 102330 212436 13995 137436 279786 277717 108042 178060 245968 40185 217240 165969 68979 19566 259014 284962 220729 152571 ...

output:

possible
99984 0
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

result:

ok answer is POSSIBLE

Test #147:

score: 0
Accepted
time: 13ms
memory: 17300kb

input:

15723 38993
24734 24697 32300 36794 25889 35678 19793 23382 23182 24325 33135 38275 36666 35513 38689 34076 33146 31716 22997 22053 29483 26786 22226 20320 34952 36427 27243 36597 22963 27443 36797 24322 30591 32354 32410 32738 25126 33880 31270 24013 33501 28401 20560 38890 29587 33532 31515 27382 ...

output:

possible
359 0
138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 138 1...

result:

ok answer is POSSIBLE

Test #148:

score: 0
Accepted
time: 16ms
memory: 17644kb

input:

19865 50789
28220 43743 40954 50254 37425 47182 50480 47326 31575 35746 46358 43254 47236 42618 39314 49557 40067 48758 35213 47650 42582 28862 44863 48265 31006 37326 49556 45608 45765 45829 44931 47830 41456 50541 35895 49477 36917 41647 43369 31548 42750 45749 32235 27147 45944 40928 38082 40387 ...

output:

possible
427 0
150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 1...

result:

ok answer is POSSIBLE

Test #149:

score: 0
Accepted
time: 802ms
memory: 142380kb

input:

71058 182851
172640 135797 124827 142335 182151 168784 170811 121206 96052 152223 180922 170610 166537 160421 114260 170657 100736 103394 151424 125889 126770 146872 170866 150207 124209 130296 99237 129519 103553 167713 174172 111072 166127 179985 125961 180401 131144 152718 145018 144355 100204 11...

output:

possible
91424 0
91428 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #150:

score: 0
Accepted
time: 1777ms
memory: 155452kb

input:

147552 299993
137707 263672 108702 284588 284121 246100 285710 259629 237983 172673 247011 255246 264719 250916 265823 195752 226501 139552 211497 145159 295731 148048 259791 289564 188712 221677 264405 295678 136531 217975 227580 162329 101294 168163 255823 235128 296331 253186 192300 266409 220196...

output:

possible
149996 0
149998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #151:

score: 0
Accepted
time: 1380ms
memory: 128392kb

input:

144281 299983
156923 252061 138163 152281 149005 118124 118801 250164 159713 222713 265431 230543 238602 239140 277718 239676 228546 276255 197554 183509 170323 254910 207640 144118 299322 202767 249498 276581 164565 200335 249457 279148 138514 175906 272679 243070 183250 173551 162962 223022 273885...

output:

possible
149991 0
149993 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #152:

score: 0
Accepted
time: 1516ms
memory: 139504kb

input:

136340 299977
115873 160775 293630 106186 122314 236884 226661 225086 215398 237715 296851 245041 103255 155866 206696 265316 157211 233963 143261 272867 238781 190686 273904 298626 200137 157567 240764 268271 294433 217205 226393 116357 165154 170476 167414 229680 106041 214406 299547 254431 255427...

output:

possible
149987 0
149991 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #153:

score: 0
Accepted
time: 1260ms
memory: 120124kb

input:

149507 299969
174447 217864 180470 254941 250370 190891 190619 137151 127459 167716 268743 277053 129906 157065 248983 237024 139038 186025 273283 225904 156606 188417 286658 205669 133840 143462 262804 131612 115515 284766 221226 241905 110787 110423 249899 175816 197927 106929 257830 255134 249134...

output:

possible
149983 0
149987 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #154:

score: 0
Accepted
time: 1512ms
memory: 135360kb

input:

153858 299951
290558 219603 162983 228851 142647 219491 100674 259088 199178 181781 245294 196052 244036 232020 205330 192751 231850 270160 208461 291363 194042 259737 197037 146590 299400 115956 100215 148910 285052 170549 173531 112895 205622 149682 137875 248281 196730 281174 190164 257309 210132...

output:

possible
149962 0
149990 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #155:

score: 0
Accepted
time: 20ms
memory: 21240kb

input:

7803 115201
11571 107548 16211 8439 10643 59044 34655 35003 45878 82057 37716 55071 75967 27856 43690 29522 90351 67512 87609 83362 24418 42282 31075 9325 99905 105721 81606 49039 53115 7179 95078 69136 113290 85550 87625 11094 64280 74256 47344 47995 61902 83810 56550 11181 22098 77256 48517 64831 ...

output:

possible
3985 0
29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29...

result:

ok answer is POSSIBLE

Test #156:

score: 0
Accepted
time: 47ms
memory: 25536kb

input:

14465 213553
160979 186995 206541 117247 23026 182642 100340 60175 193143 192621 126907 59337 67338 134563 191139 176813 197577 119599 145960 105215 13137 168058 65192 130996 23377 195492 17606 51101 188329 187166 54752 84767 196275 43909 27872 209003 192853 112378 51620 167620 76244 74562 110000 15...

output:

possible
7389 0
29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29...

result:

ok answer is POSSIBLE

Test #157:

score: 0
Accepted
time: 2ms
memory: 16620kb

input:

8770 17539
16916 10140 10138 5166 7198 6234 9350 8362 3494 13754 7978 9794 10734 9724 130 3658 4010 17478 12058 1024 236 5862 5162 9380 2240 16538 3162 16170 6394 8542 15336 6658 10794 3154 15456 3142 16132 15458 13800 10952 3246 5266 2638 8148 16964 16884 16824 1448 11202 10870 5244 16622 7536 1573...

output:

possible
8769 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #158:

score: 0
Accepted
time: 1507ms
memory: 136572kb

input:

149997 299993
201424 247789 247103 196622 210765 214872 267079 253638 203983 198321 205689 203141 229017 243986 220877 298555 226087 219555 235120 276196 167744 218215 151401 290128 253796 245672 223371 279888 219904 265663 167903 160878 228788 224592 181097 212960 272102 223129 153374 180747 241181...

output:

possible
149996 0
149998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok answer is POSSIBLE

Test #159:

score: 0
Accepted
time: 116ms
memory: 45192kb

input:

2 199999
1 100000

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #160:

score: 0
Accepted
time: 1675ms
memory: 154768kb

input:

2 300000
547 1

output:

possible
149850 0
547 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok answer is POSSIBLE

Test #161:

score: 0
Accepted
time: 1536ms
memory: 143188kb

input:

2 299755
1 547

output:

possible
149605 0
547 547 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok answer is POSSIBLE

Test #162:

score: 0
Accepted
time: 1530ms
memory: 144308kb

input:

2 299754
547 1

output:

possible
149604 0
547 547 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok answer is POSSIBLE

Test #163:

score: 0
Accepted
time: 241ms
memory: 54600kb

input:

2 299997
1 149999

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #164:

score: 0
Accepted
time: 0ms
memory: 12108kb

input:

3 3
1 2 2

output:

impossible

result:

ok answer is IMPOSSIBLE

Test #165:

score: 0
Accepted
time: 0ms
memory: 16136kb

input:

3 11
1 2 6

output:

possible
4 0
2 2 6 1 
4 1
2 2 1 6 

result:

ok answer is POSSIBLE

Test #166:

score: 0
Accepted
time: 0ms
memory: 16384kb

input:

3 3821
1 2 1911

output:

possible
956 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #167:

score: 0
Accepted
time: 7ms
memory: 17708kb

input:

3 37107
1 2 18554

output:

possible
9278 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok answer is POSSIBLE

Test #168:

score: 0
Accepted
time: 12ms
memory: 20160kb

input:

3 84285
1 2 42143

output:

possible
21072 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #169:

score: 0
Accepted
time: 33ms
memory: 24408kb

input:

3 177107
1 2 88554

output:

possible
44278 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #170:

score: 0
Accepted
time: 36ms
memory: 25576kb

input:

3 199999
1 2 100000

output:

possible
50001 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #171:

score: 0
Accepted
time: 62ms
memory: 30264kb

input:

3 299997
1 2 149999

output:

possible
75000 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE

Test #172:

score: 0
Accepted
time: 62ms
memory: 30244kb

input:

3 299999
1 2 150000

output:

possible
75001 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok answer is POSSIBLE