QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#35624#3816. Home alone: Johnny lost in New YorkAppleblue17#AC ✓12ms18428kbC++144.0kb2022-06-17 12:30:342022-06-17 12:30:34

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-06-17 12:30:34]
  • 评测
  • 测评结果:AC
  • 用时:12ms
  • 内存:18428kb
  • [2022-06-17 12:30:34]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=1100;
int n,m;
int fx[4][2]={{-1,0},{0,1},{1,0},{0,-1}};
int dir[N][N],tmp[N][N],sav[N][N];
bool vis[N][N];

bool dfs0(int dep,int x,int y,int l,int r,int L,int R,int edx,int edy){
	if(vis[x][y]) return 0;
	vis[x][y]=1;
	if(x==edx && y==edy && dep==(r-l+1)*(R-L+1)) return 1;
	for(int t=0;t<4;t++){
		int nx=x+fx[t][0],ny=y+fx[t][1];
		if(nx<l || nx>r || ny<L || ny>R || vis[nx][ny]) continue;
		if(dfs0(dep+1,nx,ny,l,r,L,R,edx,edy)){
			dir[x][y]=t;
			return 1;
		}
	}
	vis[x][y]=0;
	return 0;
}

void dfs(int l,int r,int L,int R,int stx,int sty,int edx,int edy){
	if(r-l+1<6 && R-L+1<6){
		if(!dfs0(1,stx,sty,l,r,L,R,edx,edy)){
			puts("NIE");
			exit(0);
		}
		return ;
	}
	if(r-l+1>=6){
		if(stx>l+1 && edx>l+1){
			dfs(l+2,r,L,R,stx,sty,edx,edy);
			for(int i=L;i<=R;i++){
				if(dir[l+2][i]==3){
					dir[l+2][i]=0;
					for(int t=i;t<R;t++) dir[l+1][t]=1;
					dir[l+1][R]=0;
					for(int t=L+1;t<=R;t++) dir[l][t]=3;
					dir[l][L]=2;
					for(int t=L;t<i-1;t++) dir[l+1][t]=1;
					dir[l+1][i-1]=2;
					break ;
				}
				if(dir[l+2][i]==1){
					dir[l+2][i]=0;
					for(int t=L+1;t<=i;t++) dir[l+1][t]=3;
					dir[l+1][L]=0;
					for(int t=L;t<R;t++) dir[l][t]=1;
					dir[l][R]=2;
					for(int t=i+2;t<=R;t++) dir[l+1][t]=3;
					dir[l+1][i+1]=2;
					break ;
				}
			}
		}
		else if(stx>l+1 || edx>l+1){
			int X,Y,XX,YY,nx,ny;
			if(stx<=l+1) X=stx,XX=edx,Y=sty,YY=edy;
			else X=edx,XX=stx,Y=edy,YY=sty;
			
			if(X==l+1){
				if(Y==R){
					nx=l+2,ny=R-1;
					tmp[l+1][R]=0;
					for(int t=L+1;t<=R;t++) tmp[l][t]=3;
					tmp[l][L]=2;
					for(int t=L;t<R-1;t++) tmp[l+1][t]=1;
					tmp[l+1][R-1]=2;
				}
				else{
					nx=l+2,ny=Y+1;
					for(int t=L+1;t<=Y;t++) tmp[l+1][t]=3;
					tmp[l+1][L]=0;
					for(int t=L;t<R;t++) tmp[l][t]=1;
					tmp[l][R]=2;
					for(int t=Y+2;t<=R;t++) tmp[l+1][t]=3;
					tmp[l+1][Y+1]=2;
				}
			}
			else{
				if(Y+2>R || (l+2==XX && Y+2==YY)){
					nx=l+2,ny=Y-2;
					for(int t=Y;t<R;t++) tmp[l][t]=1;
					tmp[l][R]=2;
					for(int t=Y;t<=R;t++) tmp[l+1][t]=3;
					tmp[l+1][Y-1]=0;
					for(int t=L+1;t<=Y-1;t++) tmp[l][t]=3;
					tmp[l][L]=2;
					for(int t=L;t<=Y-3;t++) tmp[l+1][t]=1;
					tmp[l+1][Y-2]=2;
				}
				else{
					nx=l+2,ny=Y+2;
					for(int t=L+1;t<=Y;t++) tmp[l][t]=3;
					tmp[l][L]=2;
					for(int t=L;t<=Y;t++) tmp[l+1][t]=1;
					tmp[l+1][Y+1]=0;
					for(int t=Y+1;t<R;t++) tmp[l][t]=1;
					tmp[l][R]=2;
					for(int t=Y+3;t<=R;t++) tmp[l+1][t]=3;
					tmp[l+1][Y+2]=2;
					
				}
			}
			if(stx<=l+1){
				for(int i=l;i<=l+1;i++)
					for(int t=L;t<=R;t++) dir[i][t]=tmp[i][t];
				dfs(l+2,r,L,R,nx,ny,edx,edy);
			}
			else{
				for(int i=l;i<=l+1;i++)
					for(int t=L;t<=R;t++){
						int d=tmp[i][t];
						int nx=i+fx[d][0],ny=t+fx[d][1];
						int nd=d+((d>=2)?(-2):(2));
						dir[nx][ny]=nd;
					}
				dfs(l+2,r,L,R,stx,sty,nx,ny);
				dir[nx][ny]=0;
			}
		}
		else{
			for(int t=0;l+t<=r-t;t++)
				for(int i=L;i<=R;i++) swap(dir[l+t][i],dir[r-t][i]);
			dfs(l,r,L,R,l+r-stx,sty,l+r-edx,edy);
			for(int t=0;l+t<=r-t;t++)
				for(int i=L;i<=R;i++) swap(dir[l+t][i],dir[r-t][i]);
			for(int i=l;i<=r;i++)
				for(int t=L;t<=R;t++){
					if(dir[i][t]==2) dir[i][t]=0;
					else if(dir[i][t]==0) dir[i][t]=2;
				}
		}
	}
	else{
		for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) sav[i][j]=dir[i][j];
		dfs(L,R,l,r,sty,stx,edy,edx);
		for(int i=L;i<=R;i++)
			for(int j=l;j<=r;j++) tmp[i][j]=dir[i][j];
		for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) dir[i][j]=sav[i][j];
		for(int i=l;i<=r;i++) for(int j=L;j<=R;j++) dir[i][j]=3-tmp[j][i];
	}
	dir[edx][edy]=0;
}

int main(){
	cin>>m>>n;
	int stx,sty,edx,edy;
	cin>>sty>>stx>>edy>>edx;
	dfs(1,n,1,m,stx,sty,edx,edy);
	
	int curx=stx,cury=sty;
	for(int i=1;i<n*m;i++){
		int d=dir[curx][cury];
		curx+=fx[d][0],cury+=fx[d][1];
		if(d==0) putchar('G');
		else if(d==1) putchar('P');
		else if(d==2) putchar('D');
		else if(d==3) putchar('L');
	}
}

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 5632kb

input:

4 4
1 1
1 4

output:

PPPDDDLGGLLDPDL

result:

ok correct path

Test #2:

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

input:

4 4
3 2
2 3

output:

NIE

result:

ok no solution

Test #3:

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

input:

5 5
1 2
1 4

output:

NIE

result:

ok no solution

Test #4:

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

input:

6 6
1 1
1 4

output:

DPGPPPPDLLLDDDPPGLGPPDDDLLLLLGPGGLD

result:

ok correct path

Test #5:

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

input:

4 5
2 3
3 5


output:

GGLDDDDPGPGGGPDDDDL

result:

ok correct path

Test #6:

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

input:

4 6
1 2
2 5

output:

NIE

result:

ok no solution

Test #7:

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

input:

6 6
1 5
4 5

output:

DPGGLGGGPPPPPDLLLLDPDDDPPPGLGPGLLDD

result:

ok correct path

Test #8:

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

input:

38 6
33 5
36 5

output:

DPGGLLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDDDPPPGLGPGLLDD

result:

ok correct path

Test #9:

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

input:

57 6
26 3
29 5

output:

LLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDDDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPGPDDLDPPPPPPGLLLGPPPPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPD...

result:

ok correct path

Test #10:

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

input:

64 126
45 13
48 15


output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPP...

result:

ok correct path

Test #11:

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

input:

64 32
35 13
48 15


output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPP...

result:

ok correct path

Test #12:

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

input:

7 6
2 6
6 3


output:

LGGGGGPPPPPPDLLLLLDDDPDPPPPGLLLGLGPPDPPGL

result:

ok correct path

Test #13:

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

input:

7 6
7 3
2 5


output:

LLLLDDPGPDPGPDDLLLLLLGGGGGPPPPPPDLLLLLDDD

result:

ok correct path

Test #14:

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

input:

7 6
6 3
2 4


output:

PDLLGLLDPDPPPDLLLLGLDLGGGGGPPPPPPDLLLLLDD

result:

ok correct path

Test #15:

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

input:

7 6
5 1
1 4


output:

LLLLDPPPPPGPDDLLLLDDPGPDPGPDDLLLLLLGPGGLD

result:

ok correct path

Test #16:

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

input:

880 584
174 341
325 562

output:

NIE

result:

ok no solution

Test #17:

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

input:

967 756
949 395
377 19

output:

NIE

result:

ok no solution

Test #18:

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

input:

712 45
178 32
483 32

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #19:

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

input:

7 8
5 1
1 8


output:

LLLLDPPPPPGPDDDLGLLLLLDPPPPDDDPGGPDDDLLLLGPGGLDLGLDDPDL

result:

ok correct path

Test #20:

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

input:

8 9
3 1
1 8


output:

LLDPPPGPPPPDLLLDLLLLDPPPPPGPPDLDPDLLGLDDPDPGPDDLLLGLDLGGPGGLDLGLDDPDDLG

result:

ok correct path

Test #21:

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

input:

201 612
48 527
187 381

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #22:

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

input:

267 772
169 633
3 764

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #23:

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

input:

601 125
583 3
124 124

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #24:

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

input:

683 73
399 68
138 11

output:

NIE

result:

ok no solution

Test #25:

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

input:

624 43
603 9
15 31

output:

NIE

result:

ok no solution

Test #26:

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

input:

306 48
225 8
199 30

output:

NIE

result:

ok no solution

Test #27:

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

input:

505 121
408 87
80 115

output:

NIE

result:

ok no solution

Test #28:

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

input:

561 984
276 114
60 403

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #29:

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

input:

674 732
486 255
180 24

output:

LDPPGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGP...

result:

ok correct path

Test #30:

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

input:

136 961
7 45
106 317

output:

LLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #31:

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

input:

848 52
839 17
639 30

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #32:

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

input:

10 249
1 201
1 113

output:

NIE

result:

ok no solution

Test #33:

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

input:

568 561
300 150
522 296

output:

NIE

result:

ok no solution

Test #34:

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

input:

118 145
79 40
5 49

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #35:

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

input:

365 970
359 157
151 266

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #36:

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

input:

142 455
68 376
95 287

output:

NIE

result:

ok no solution

Test #37:

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

input:

10 687
2 298
2 86

output:

NIE

result:

ok no solution

Test #38:

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

input:

245 653
227 229
135 478

output:

NIE

result:

ok no solution

Test #39:

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

input:

358 807
122 766
231 236

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #40:

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

input:

509 575
165 337
197 9

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDD...

result:

ok correct path

Test #41:

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

input:

858 97
132 7
211 12

output:

NIE

result:

ok no solution

Test #42:

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

input:

534 418
262 390
80 322

output:

NIE

result:

ok no solution

Test #43:

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

input:

546 834
393 126
326 451

output:

NIE

result:

ok no solution

Test #44:

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

input:

63 455
18 198
1 53

output:

DDDLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #45:

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

input:

48 99
2 17
45 81

output:

GPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #46:

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

input:

87 94
31 62
6 10

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGP...

result:

ok correct path

Test #47:

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

input:

919 743
39 559
195 734

output:

NIE

result:

ok no solution

Test #48:

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

input:

802 44
372 6
303 43

output:

NIE

result:

ok no solution

Test #49:

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

input:

993 325
356 174
100 65

output:

NIE

result:

ok no solution

Test #50:

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

input:

999 937
570 40
820 415

output:

NIE

result:

ok no solution

Test #51:

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

input:

510 116
143 41
424 12

output:

NIE

result:

ok no solution

Test #52:

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

input:

271 388
205 336
240 195

output:

NIE

result:

ok no solution

Test #53:

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

input:

567 555
556 528
328 211

output:

NIE

result:

ok no solution

Test #54:

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

input:

572 939
227 830
245 45

output:

GPDDLDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLD...

result:

ok correct path

Test #55:

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

input:

157 269
53 16
56 144

output:

NIE

result:

ok no solution

Test #56:

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

input:

263 766
107 356
238 389

output:

NIE

result:

ok no solution

Test #57:

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

input:

154 507
52 12
52 59

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #58:

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

input:

200 626
191 337
47 262

output:

PPPDLLDPPPGGPDDPGGPDDPGGPDDDLLLLLLLLLGGLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDD...

result:

ok correct path

Test #59:

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

input:

738 613
114 396
538 66

output:

NIE

result:

ok no solution

Test #60:

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

input:

276 290
265 119
69 262

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #61:

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

input:

355 272
336 215
14 71

output:

NIE

result:

ok no solution

Test #62:

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

input:

347 191
233 64
100 7

output:

NIE

result:

ok no solution

Test #63:

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

input:

39 154
18 24
13 147

output:

NIE

result:

ok no solution

Test #64:

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

input:

574 339
137 190
25 199

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #65:

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

input:

559 250
184 43
542 191

output:

NIE

result:

ok no solution

Test #66:

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

input:

783 628
109 143
679 213

output:

NIE

result:

ok no solution

Test #67:

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

input:

43 533
8 481
8 434

output:

NIE

result:

ok no solution

Test #68:

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

input:

32 743
6 505
20 11

output:

NIE

result:

ok no solution

Test #69:

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

input:

833 858
769 606
774 440

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #70:

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

input:

888 12
695 11
76 1

output:

PPGLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLG...

result:

ok correct path

Test #71:

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

input:

593 412
501 306
414 22

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #72:

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

input:

491 126
163 28
302 24

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #73:

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

input:

128 440
100 195
18 199

output:

NIE

result:

ok no solution

Test #74:

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

input:

548 412
498 267
127 214

output:

NIE

result:

ok no solution

Test #75:

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

input:

228 695
38 68
104 292

output:

NIE

result:

ok no solution

Test #76:

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

input:

590 20
329 13
188 10

output:

NIE

result:

ok no solution

Test #77:

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

input:

376 676
209 567
83 578

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #78:

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

input:

219 681
208 243
85 54

output:

NIE

result:

ok no solution

Test #79:

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

input:

549 498
339 110
121 63

output:

PPPDLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGL...

result:

ok correct path

Test #80:

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

input:

401 202
31 22
290 67

output:

NIE

result:

ok no solution

Test #81:

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

input:

156 299
101 60
107 63

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #82:

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

input:

948 160
945 79
459 76

output:

PPPDLLLDPPPDLLLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDD...

result:

ok correct path

Test #83:

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

input:

488 808
359 119
336 401

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #84:

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

input:

144 811
4 115
141 21

output:

LDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #85:

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

input:

727 324
531 92
213 247

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #86:

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

input:

983 971
236 693
22 930

output:

NIE

result:

ok no solution

Test #87:

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

input:

185 640
161 536
104 308

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #88:

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

input:

36 273
34 147
30 119

output:

NIE

result:

ok no solution

Test #89:

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

input:

122 381
86 318
22 326

output:

NIE

result:

ok no solution

Test #90:

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

input:

131 243
2 41
80 54

output:

NIE

result:

ok no solution

Test #91:

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

input:

32 664
15 435
19 197

output:

NIE

result:

ok no solution

Test #92:

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

input:

558 704
47 579
104 703

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #93:

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

input:

182 794
160 183
157 379

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #94:

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

input:

926 916
918 318
917 686

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #95:

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

input:

434 360
351 120
5 185

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #96:

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

input:

292 480
193 30
268 293

output:

NIE

result:

ok no solution

Test #97:

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

input:

619 528
152 354
35 164

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #98:

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

input:

348 594
178 239
61 514

output:

NIE

result:

ok no solution

Test #99:

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

input:

263 95
155 87
209 28

output:

NIE

result:

ok no solution

Test #100:

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

input:

296 120
140 89
260 52

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGG...

result:

ok correct path

Test #101:

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

input:

690 593
138 190
637 579

output:

NIE

result:

ok no solution

Test #102:

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

input:

802 49
132 23
449 5

output:

LDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDD...

result:

ok correct path

Test #103:

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

input:

788 47
175 4
621 3

output:

GPDDLDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLD...

result:

ok correct path

Test #104:

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

input:

154 994
89 933
128 540

output:

NIE

result:

ok no solution

Test #105:

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

input:

898 768
653 515
829 651

output:

NIE

result:

ok no solution

Test #106:

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

input:

445 933
221 471
422 869

output:

NIE

result:

ok no solution

Test #107:

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

input:

685 529
162 1
340 414

output:

NIE

result:

ok no solution

Test #108:

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

input:

223 827
10 541
138 219

output:

NIE

result:

ok no solution

Test #109:

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

input:

189 453
87 140
95 24

output:

NIE

result:

ok no solution

Test #110:

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

input:

624 89
242 19
521 15

output:

LDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDD...

result:

ok correct path

Test #111:

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

input:

486 735
105 477
139 496

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #112:

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

input:

800 313
184 116
212 280

output:

NIE

result:

ok no solution

Test #113:

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

input:

494 883
175 90
134 506

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #114:

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

input:

845 436
726 103
539 382

output:

NIE

result:

ok no solution

Test #115:

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

input:

309 275
159 260
108 185

output:

NIE

result:

ok no solution

Test #116:

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

input:

540 807
325 588
131 323

output:

GPDDLDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLD...

result:

ok correct path

Test #117:

score: 0
Accepted
time: 9ms
memory: 17200kb

input:

910 838
807 658
724 584

output:

GPPPDLLDPPPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPG...

result:

ok correct path

Test #118:

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

input:

75 464
39 314
40 461

output:

NIE

result:

ok no solution

Test #119:

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

input:

279 14
42 10
234 13

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #120:

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

input:

811 644
483 370
471 336

output:

NIE

result:

ok no solution

Test #121:

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

input:

761 823
672 292
570 537

output:

NIE

result:

ok no solution

Test #122:

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

input:

201 149
51 29
187 18

output:

NIE

result:

ok no solution

Test #123:

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

input:

441 41
378 12
36 15

output:

NIE

result:

ok no solution

Test #124:

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

input:

21 510
11 58
18 81

output:

NIE

result:

ok no solution

Test #125:

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

input:

949 375
308 210
282 225

output:

NIE

result:

ok no solution

Test #126:

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

input:

759 763
553 42
160 727

output:

NIE

result:

ok no solution

Test #127:

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

input:

236 958
78 937
84 796

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #128:

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

input:

722 134
14 59
606 46

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #129:

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

input:

809 800
723 380
789 198

output:

NIE

result:

ok no solution

Test #130:

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

input:

531 648
37 131
420 81

output:

PDLDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #131:

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

input:

689 470
425 192
368 67

output:

NIE

result:

ok no solution

Test #132:

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

input:

967 92
543 81
397 28

output:

PPPPDLLLDPPPPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDD...

result:

ok correct path

Test #133:

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

input:

513 388
353 186
318 7

output:

NIE

result:

ok no solution

Test #134:

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

input:

553 720
252 434
550 15

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #135:

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

input:

360 932
116 900
118 545

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #136:

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

input:

862 527
52 339
473 119

output:

LDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #137:

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

input:

380 215
295 55
244 156

output:

NIE

result:

ok no solution

Test #138:

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

input:

197 281
77 108
115 121

output:

NIE

result:

ok no solution

Test #139:

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

input:

125 194
7 188
29 47

output:

GPDDLLGGLDDLGGLDDLGGLDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #140:

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

input:

840 421
277 385
175 215

output:

NIE

result:

ok no solution

Test #141:

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

input:

245 270
236 243
207 164

output:

NIE

result:

ok no solution

Test #142:

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

input:

660 242
51 219
89 137

output:

NIE

result:

ok no solution

Test #143:

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

input:

157 425
55 399
53 55

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #144:

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

input:

676 505
43 363
481 88

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #145:

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

input:

610 532
288 331
1 275

output:

LDPPGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGP...

result:

ok correct path

Test #146:

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

input:

158 327
67 70
78 180

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLL...

result:

ok correct path

Test #147:

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

input:

11 382
8 7
6 284

output:

LLLLLLGPPPPPPPPPGLLLLLLLLLGPPPPPPPPPGLLLLLLLLLGPPPPPPPPPGLLLLLLLLLLDDDDDDDPPPPPPPPGPPDLDPDLLGLLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPPGPPDLDPDLLGLLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPPGPPDLDPDLLGLLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPPGPPDLDPDLLGLLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPPGPPDLDPDLLGLLLLLLLLDPPPPPPPDLLLLLLLDPPPPPP...

result:

ok correct path

Test #148:

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

input:

874 12
106 7
72 10

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #149:

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

input:

863 722
692 328
124 121

output:

PPDLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #150:

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

input:

996 262
376 123
512 112

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGG...

result:

ok correct path

Test #151:

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

input:

343 379
239 172
314 265

output:

NIE

result:

ok no solution

Test #152:

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

input:

27 737
6 314
14 647

output:

NIE

result:

ok no solution

Test #153:

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

input:

23 994
17 502
20 802

output:

LLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #154:

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

input:

109 93
6 90
80 86

output:

GLLLLLDDDDPGGGPDDDPGGGPDDDPGGPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPPPGLGGGPDDPGGPDDDLDPP...

result:

ok correct path

Test #155:

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

input:

518 882
247 6
464 608

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #156:

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

input:

727 440
553 219
84 123

output:

PPPPDLLLDPPPPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDD...

result:

ok correct path

Test #157:

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

input:

611 660
516 179
235 137

output:

LDPPGPPDLDPPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDDLLLLLLLLLLLL...

result:

ok correct path

Test #158:

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

input:

792 533
346 91
782 450

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #159:

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

input:

173 134
108 61
123 63

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #160:

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

input:

781 911
349 802
497 416

output:

NIE

result:

ok no solution

Test #161:

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

input:

259 312
204 154
117 145

output:

NIE

result:

ok no solution

Test #162:

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

input:

278 905
108 812
33 796

output:

PPGLLLDDPPPDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDD...

result:

ok correct path

Test #163:

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

input:

290 514
156 101
134 53

output:

NIE

result:

ok no solution

Test #164:

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

input:

200 318
85 64
130 226

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #165:

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

input:

50 23
22 22
3 5

output:

NIE

result:

ok no solution

Test #166:

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

input:

403 155
68 133
46 89

output:

NIE

result:

ok no solution

Test #167:

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

input:

694 361
515 221
616 55

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDD...

result:

ok correct path

Test #168:

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

input:

101 593
61 107
5 591

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #169:

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

input:

892 255
683 205
336 52

output:

NIE

result:

ok no solution

Test #170:

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

input:

866 777
40 507
687 84

output:

NIE

result:

ok no solution

Test #171:

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

input:

467 374
248 280
132 186

output:

NIE

result:

ok no solution

Test #172:

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

input:

423 251
138 1
108 6

output:

NIE

result:

ok no solution

Test #173:

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

input:

681 586
678 580
678 392

output:

NIE

result:

ok no solution

Test #174:

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

input:

455 969
25 65
411 756

output:

NIE

result:

ok no solution

Test #175:

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

input:

614 304
413 93
290 8

output:

NIE

result:

ok no solution

Test #176:

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

input:

202 155
25 78
159 103

output:

LLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #177:

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

input:

729 84
381 33
537 52

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #178:

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

input:

415 982
109 364
233 582

output:

NIE

result:

ok no solution

Test #179:

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

input:

966 505
581 211
871 188

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDD...

result:

ok correct path

Test #180:

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

input:

278 799
68 589
57 343

output:

LDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #181:

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

input:

252 182
241 81
4 48

output:

NIE

result:

ok no solution

Test #182:

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

input:

851 155
480 14
750 41

output:

NIE

result:

ok no solution

Test #183:

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

input:

9 657
9 335
8 260

output:

LDPDLLLDPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPDLLLLLLLDPPPPPPPD...

result:

ok correct path

Test #184:

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

input:

728 808
46 34
547 806

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #185:

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

input:

105 704
98 638
18 669

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #186:

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

input:

505 804
428 300
189 447

output:

NIE

result:

ok no solution

Test #187:

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

input:

154 274
94 268
94 89

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #188:

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

input:

976 526
938 456
671 390

output:

PDLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLLLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPG...

result:

ok correct path

Test #189:

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

input:

834 52
29 31
522 26

output:

NIE

result:

ok no solution

Test #190:

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

input:

125 566
86 309
74 208

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #191:

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

input:

995 432
895 156
466 50

output:

PPPDLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDD...

result:

ok correct path

Test #192:

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

input:

767 955
610 194
199 916

output:

NIE

result:

ok no solution

Test #193:

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

input:

307 73
225 12
202 73

output:

NIE

result:

ok no solution

Test #194:

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

input:

187 722
163 179
120 678

output:

NIE

result:

ok no solution

Test #195:

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

input:

652 611
202 378
244 1

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #196:

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

input:

969 165
884 22
622 125

output:

NIE

result:

ok no solution

Test #197:

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

input:

888 321
380 14
478 297

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #198:

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

input:

413 927
401 222
318 484

output:

NIE

result:

ok no solution

Test #199:

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

input:

697 520
621 183
652 462

output:

NIE

result:

ok no solution

Test #200:

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

input:

258 236
114 26
23 182

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #201:

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

input:

944 932
929 480
601 137

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #202:

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

input:

661 691
525 577
122 581

output:

NIE

result:

ok no solution

Test #203:

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

input:

704 668
205 369
289 258

output:

PDLDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLG...

result:

ok correct path

Test #204:

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

input:

572 618
548 32
478 376

output:

NIE

result:

ok no solution

Test #205:

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

input:

491 587
410 273
167 484

output:

NIE

result:

ok no solution

Test #206:

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

input:

309 165
223 8
221 112

output:

NIE

result:

ok no solution

Test #207:

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

input:

13 418
10 406
6 126

output:

NIE

result:

ok no solution

Test #208:

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

input:

992 492
965 18
330 382

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #209:

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

input:

879 708
66 674
828 203

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #210:

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

input:

486 876
465 311
444 534

output:

NIE

result:

ok no solution

Test #211:

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

input:

326 65
246 10
10 46

output:

NIE

result:

ok no solution

Test #212:

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

input:

739 298
114 1
640 253

output:

NIE

result:

ok no solution

Test #213:

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

input:

310 998
223 823
240 553

output:

PDLDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLG...

result:

ok correct path

Test #214:

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

input:

17 300
11 50
2 163

output:

NIE

result:

ok no solution

Test #215:

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

input:

403 366
53 268
29 46

output:

NIE

result:

ok no solution

Test #216:

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

input:

832 559
591 426
168 227

output:

NIE

result:

ok no solution

Test #217:

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

input:

204 458
147 188
25 61

output:

GPDDLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDL...

result:

ok correct path

Test #218:

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

input:

787 79
681 17
244 63

output:

NIE

result:

ok no solution

Test #219:

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

input:

768 341
475 179
556 278

output:

NIE

result:

ok no solution

Test #220:

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

input:

265 596
229 400
174 395

output:

NIE

result:

ok no solution

Test #221:

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

input:

647 135
247 112
265 25

output:

NIE

result:

ok no solution

Test #222:

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

input:

554 439
236 102
92 202

output:

NIE

result:

ok no solution

Test #223:

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

input:

754 383
334 280
164 156

output:

NIE

result:

ok no solution

Test #224:

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

input:

256 113
2 90
135 75

output:

NIE

result:

ok no solution

Test #225:

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

input:

633 289
580 238
627 25

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #226:

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

input:

984 176
925 22
244 27

output:

NIE

result:

ok no solution

Test #227:

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

input:

490 33
91 26
296 8

output:

GPDDLDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLD...

result:

ok correct path

Test #228:

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

input:

820 615
312 369
540 593

output:

NIE

result:

ok no solution

Test #229:

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

input:

64 317
10 21
23 172

output:

NIE

result:

ok no solution

Test #230:

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

input:

338 128
234 98
186 112

output:

NIE

result:

ok no solution

Test #231:

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

input:

706 69
662 69
47 23

output:

PPGLLGPPGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLGLDDDDLLGPGGGLDDLGGLDDDPDLLLGPGGGLDDLGGLDDDPDLLLGPGGGLDDLGGLDDDPDLLLGPGGGLDDL...

result:

ok correct path

Test #232:

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

input:

997 520
74 460
987 338

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #233:

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

input:

125 45
59 14
57 2

output:

NIE

result:

ok no solution

Test #234:

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

input:

343 387
209 288
75 362

output:

NIE

result:

ok no solution

Test #235:

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

input:

340 759
328 48
276 417

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #236:

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

input:

249 750
162 747
68 610

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGP...

result:

ok correct path

Test #237:

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

input:

47 215
9 153
10 214

output:

LLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #238:

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

input:

899 604
859 221
610 572

output:

NIE

result:

ok no solution

Test #239:

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

input:

967 811
583 240
205 119

output:

NIE

result:

ok no solution

Test #240:

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

input:

836 825
283 238
263 678

output:

NIE

result:

ok no solution

Test #241:

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

input:

366 720
304 142
362 346

output:

NIE

result:

ok no solution

Test #242:

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

input:

989 343
91 70
480 171

output:

NIE

result:

ok no solution

Test #243:

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

input:

248 850
48 427
194 625

output:

NIE

result:

ok no solution

Test #244:

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

input:

277 852
91 620
17 789

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #245:

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

input:

381 892
33 235
344 143

output:

PDLDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #246:

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

input:

158 554
48 485
103 363

output:

LDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #247:

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

input:

509 49
181 27
17 19

output:

PPPPDLLLLDPPPPDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGP...

result:

ok correct path

Test #248:

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

input:

896 320
190 72
627 234

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #249:

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

input:

368 464
366 371
162 82

output:

LDPPDLLLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLD...

result:

ok correct path

Test #250:

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

input:

512 423
170 376
79 411

output:

NIE

result:

ok no solution

Test #251:

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

input:

238 253
42 42
12 93

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #252:

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

input:

132 651
108 642
74 45

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #253:

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

input:

168 268
39 88
151 251

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLL...

result:

ok correct path

Test #254:

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

input:

409 178
26 74
3 46

output:

DDLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #255:

score: 0
Accepted
time: 9ms
memory: 16064kb

input:

315 641
292 604
126 248

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPP...

result:

ok correct path

Test #256:

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

input:

284 353
200 124
57 157

output:

NIE

result:

ok no solution

Test #257:

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

input:

904 862
669 414
543 424

output:

NIE

result:

ok no solution

Test #258:

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

input:

806 596
663 72
544 376

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #259:

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

input:

654 431
373 289
438 388

output:

NIE

result:

ok no solution

Test #260:

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

input:

728 434
700 80
60 126

output:

NIE

result:

ok no solution

Test #261:

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

input:

249 296
81 186
38 240

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #262:

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

input:

376 59
366 12
193 23

output:

NIE

result:

ok no solution

Test #263:

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

input:

149 563
26 22
87 192

output:

NIE

result:

ok no solution

Test #264:

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

input:

447 153
300 70
36 78

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLG...

result:

ok correct path

Test #265:

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

input:

477 151
110 116
350 30

output:

DDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #266:

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

input:

764 57
708 10
738 15

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #267:

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

input:

457 449
63 392
333 141

output:

NIE

result:

ok no solution

Test #268:

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

input:

19 155
13 111
17 118

output:

NIE

result:

ok no solution

Test #269:

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

input:

216 489
44 3
200 323

output:

NIE

result:

ok no solution

Test #270:

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

input:

875 161
642 31
854 113

output:

NIE

result:

ok no solution

Test #271:

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

input:

293 810
81 314
91 319

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #272:

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

input:

200 553
112 302
9 234

output:

PPGLLLDDPPPDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDDPGGGPDDD...

result:

ok correct path

Test #273:

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

input:

475 874
71 582
183 717

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #274:

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

input:

221 20
203 20
87 17

output:

PPPPGLLLLGPPPPPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGPDDPGGGLLLLLLLLLLLLLLLLLLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLL...

result:

ok correct path

Test #275:

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

input:

22 277
15 91
15 64

output:

PDLDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPP...

result:

ok correct path

Test #276:

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

input:

172 498
113 364
52 330

output:

PPDLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLDDLGGLLLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGG...

result:

ok correct path

Test #277:

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

input:

366 317
118 99
115 181

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #278:

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

input:

754 626
698 412
529 409

output:

NIE

result:

ok no solution

Test #279:

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

input:

880 67
280 54
642 63

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #280:

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

input:

62 617
25 432
60 508

output:

LLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #281:

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

input:

319 113
140 49
132 51

output:

NIE

result:

ok no solution

Test #282:

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

input:

478 125
69 42
73 47

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #283:

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

input:

529 278
201 57
33 217

output:

NIE

result:

ok no solution

Test #284:

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

input:

713 452
326 374
126 94

output:

NIE

result:

ok no solution

Test #285:

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

input:

313 547
292 414
116 336

output:

PPDLLDLDPPGPDPPPPPPPPPPPPPPPPPPPGGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLDDDLGGGLLLLDDLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGG...

result:

ok correct path