QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#80598#3816. Home alone: Johnny lost in New YorkfansizheAC ✓12ms11444kbC++239.0kb2023-02-24 13:29:212023-02-24 13:29:25

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-24 13:29:25]
  • 评测
  • 测评结果:AC
  • 用时:12ms
  • 内存:11444kb
  • [2023-02-24 13:29:21]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int dx[]={-1,0,1,0},dy[]={0,1,0,-1};
char ch[]={'L','D','P','G'};
int to[1005][1005],ans,vis[1005][1005];
void dfs(int x,int y,int n,int m,int sx,int sy,int tx,int ty,int px,int py){
	if(y>m)y=1,x++;
	if(x>n){
		int x=sx,y=sy,cnt=1;
		while(x!=tx||y!=ty){
			int k=to[x+px][y+py];
			x+=dx[k],y+=dy[k];
			cnt++;
		}
		if(cnt!=n*m)return;
		ans=1;
		return;
	}
	if(x==tx&&y==ty)dfs(x,y+1,n,m,sx,sy,tx,ty,px,py);
	else for(int k=0;k<4;k++){
		int xx=x+dx[k],yy=y+dy[k];
		if(xx>=1&&xx<=n&&yy>=1&&yy<=m&&!vis[xx][yy]){
			if((k==0||k==3)&&to[xx+px][yy+py]==(k^2))continue;
			to[x+px][y+py]=k;
			vis[xx][yy]=1;
			dfs(x,y+1,n,m,sx,sy,tx,ty,px,py);
			vis[xx][yy]=0;
			if(ans==1)return;
		}
	}
}
void solve(int n,int m,int sx,int sy,int tx,int ty,int px,int py){
//	printf("%d,%d,%d,%d,%d,%d,%d,%d\n",n,m,sx,sy,tx,ty,px,py); 
	if(n<=5&&m<=5)vis[sx][sy]=1,dfs(1,1,n,m,sx,sy,tx,ty,px,py),vis[sx][sy]=0;
	else if(n>5&&sx>2&&tx>2){
		solve(n-2,m,sx-2,sy,tx-2,ty,px+2,py);
		for(int i=1;i<=m;i++)
			if(to[px+3][py+i]==1){
				to[px+3][py+i]=0;
				for(int j=i;j>1;j--)to[px+2][py+j]=3;
				to[px+2][py+1]=0;
				for(int j=1;j<m;j++)to[px+1][py+j]=1;
				to[px+1][py+m]=2;
				for(int j=m;j>i+1;j--)to[px+2][py+j]=3;
				to[px+2][py+i+1]=2;
				break;
			}else if(to[px+3][py+i]==3){
				to[px+3][py+i]=0;
				for(int j=i;j<m;j++)to[px+2][py+j]=1;
				to[px+2][py+m]=0;
				for(int j=m;j>1;j--)to[px+1][py+j]=3;
				to[px+1][py+1]=2;
				for(int j=1;j<i-1;j++)to[px+2][py+j]=1;
				to[px+2][py+i-1]=2;
				break;
			}
	}else if(m>5&&sy<=m-2&&ty<=m-2){
		solve(n,m-2,sx,sy,tx,ty,px,py);
		for(int i=1;i<=n;i++)
			if(to[px+i][py+m-2]==0){
				to[px+i][py+m-2]=1;
				for(int j=i;j<n;j++)to[px+j][py+m-1]=2;
				to[px+n][py+m-1]=1;
				for(int j=n;j>1;j--)to[px+j][py+m]=0;
				to[px+1][py+m]=3;
				for(int j=1;j<i-1;j++)to[px+j][py+m-1]=2;
				to[px+i-1][py+m-1]=3;
				break;
			}else if(to[px+i][py+m-2]==2){
				to[px+i][py+m-2]=1;
				for(int j=i;j>1;j--)to[px+j][py+m-1]=0;
				to[px+1][py+m-1]=1;
				for(int j=1;j<n;j++)to[px+j][py+m]=2;
				to[px+n][py+m]=3;
				for(int j=n;j>i+1;j--)to[px+j][py+m-1]=0;
				to[px+i+1][py+m-1]=3;
				break;
			}
	}else if(n>5&&sx<=n-2&&tx<=n-2){
		solve(n-2,m,sx,sy,tx,ty,px,py);
		for(int i=1;i<=m;i++)
			if(to[px+n-2][py+i]==1){
				to[px+n-2][py+i]=2;
				for(int j=i;j>1;j--)to[px+n-1][py+j]=3;
				to[px+n-1][py+1]=2;
				for(int j=1;j<m;j++)to[px+n][py+j]=1;
				to[px+n][py+m]=0;
				for(int j=m;j>i+1;j--)to[px+n-1][py+j]=3;
				to[px+n-1][py+i+1]=0;
				break;
			}else if(to[px+n-2][py+i]==3){
				to[px+n-2][py+i]=2;
				for(int j=i;j<m;j++)to[px+n-1][py+j]=1;
				to[px+n-1][py+m]=2;
				for(int j=m;j>1;j--)to[px+n][py+j]=3;
				to[px+n][py+1]=0;
				for(int j=1;j<i-1;j++)to[px+n-1][py+j]=1;
				to[px+n-1][py+i-1]=0;
				break;
			}
	}else if(m>5&&sy>2&&ty>2){
		solve(n,m-2,sx,sy-2,tx,ty-2,px,py+2);
		for(int i=1;i<=n;i++)
			if(to[px+i][py+3]==0){
				to[px+i][py+3]=3;
				for(int j=i;j<n;j++)to[px+j][py+2]=2;
				to[px+n][py+2]=3;
				for(int j=n;j>1;j--)to[px+j][py+1]=0;
				to[px+1][py+1]=1;
				for(int j=1;j<i-1;j++)to[px+j][py+2]=2;
				to[px+i-1][py+2]=1;
				break;
			}else if(to[px+i][py+3]==2){
				to[px+i][py+3]=3;
				for(int j=i;j>1;j--)to[px+j][py+2]=0;
				to[px+1][py+2]=3;
				for(int j=1;j<n;j++)to[px+j][py+1]=2;
				to[px+n][py+1]=1;
				for(int j=n;j>i+1;j--)to[px+j][py+2]=0;
				to[px+i+1][py+2]=1;
				break;
			}
	}else if(n>5&&sx==1&&tx>3){
		if(sy>2){
			for(int i=sy;i<m;i++)to[px+1][py+i]=1;
			to[px+1][py+m]=2;
			for(int i=m;i>=sy;i--)to[px+2][py+i]=3;
			to[px+2][py+sy-1]=0;
			for(int i=sy-1;i>1;i--)to[px+1][py+i]=3;
			to[px+1][py+1]=2;
			for(int i=1;i<sy-2;i++)to[px+2][py+i]=1;
			to[px+2][py+sy-2]=2;
			solve(n-2,m,1,sy-2,tx-2,ty,px+2,py);
		}else{
			for(int i=sy;i>1;i--)to[px+1][py+i]=3;
			to[px+1][py+1]=2;
			for(int i=1;i<=sy;i++)to[px+2][py+i]=1;
			to[px+2][py+sy+1]=0;
			for(int i=sy+1;i<m;i++)to[px+1][py+i]=1;
			to[px+1][py+m]=2;
			for(int i=m;i>sy+2;i--)to[px+2][py+i]=3;
			to[px+2][py+sy+2]=2;
			solve(n-2,m,1,sy+2,tx-2,ty,px+2,py);
		}
	}else if(m>5&&sy==m&&ty<m-2){
		if(sx>2){
			for(int i=sx;i<n;i++)to[px+i][py+m]=2;
			to[px+n][py+m]=3;
			for(int i=n;i>=sx;i--)to[px+i][py+m-1]=0;
			to[px+sx-1][py+m-1]=1;
			for(int i=sx-1;i>1;i--)to[px+i][py+m]=0;
			to[px+1][py+m]=3;
			for(int i=1;i<sx-2;i++)to[px+i][py+m-1]=2;
			to[px+sx-2][py+m-1]=3;
			solve(n,m-2,sx-2,m-2,tx,ty,px,py);
		}else{
			for(int i=sx;i>1;i--)to[px+i][py+m]=0;
			to[px+1][py+m]=3;
			for(int i=1;i<=sx;i++)to[px+i][py+m-1]=2;
			to[px+sx+1][py+m-1]=1;
			for(int i=sx+1;i<n;i++)to[px+i][py+m]=2;
			to[px+n][py+m]=3;
			for(int i=n;i>sx+2;i--)to[px+i][py+m-1]=0;
			to[px+sx+2][py+m-1]=3;
			solve(n,m-2,sx+2,m-2,tx,ty,px,py);
		}
	}else if(n>5&&sx==n&&tx<n-2){
		if(sy>2){
			for(int i=sy;i<m;i++)to[px+n][py+i]=1;
			to[px+n][py+m]=0;
			for(int i=m;i>=sy;i--)to[px+n-1][py+i]=3;
			to[px+n-1][py+sy-1]=2;
			for(int i=sy-1;i>1;i--)to[px+n][py+i]=3;
			to[px+n][py+1]=0;
			for(int i=1;i<sy-2;i++)to[px+n-1][py+i]=1;
			to[px+n-1][py+sy-2]=0;
			solve(n-2,m,n-2,sy-2,tx,ty,px,py);
		}else{
			for(int i=sy;i>1;i--)to[px+n][py+i]=3;
			to[px+n][py+1]=0;
			for(int i=1;i<=sy;i++)to[px+n-1][py+i]=1;
			to[px+n-1][py+sy+1]=2;
			for(int i=sy+1;i<m;i++)to[px+n][py+i]=1;
			to[px+n][py+m]=0;
			for(int i=m;i>sy+2;i--)to[px+n-1][py+i]=3;
			to[px+n-1][py+sy+2]=0;
			solve(n-2,m,n-2,sy+2,tx,ty,px,py);
		}
	}else if(m>5&&sy==1&&ty>3){
		if(sx>2){
			for(int i=sx;i<n;i++)to[px+i][py+1]=2;
			to[px+n][py+1]=1;
			for(int i=n;i>=sx;i--)to[px+i][py+2]=0;
			to[px+sx-1][py+2]=3;
			for(int i=sx-1;i>1;i--)to[px+i][py+1]=0;
			to[px+1][py+1]=1;
			for(int i=1;i<sx-2;i++)to[px+i][py+2]=2;
			to[px+sx-2][py+2]=1;
			solve(n,m-2,sx-2,1,tx,ty-2,px,py+2);
		}else{
			for(int i=sx;i>1;i--)to[px+i][py+1]=0;
			to[px+1][py+1]=1;
			for(int i=1;i<=sx;i++)to[px+i][py+2]=2;
			to[px+sx+1][py+2]=3;
			for(int i=sx+1;i<n;i++)to[px+i][py+1]=2;
			to[px+n][py+1]=1;
			for(int i=n;i>sx+2;i--)to[px+i][py+2]=0;
			to[px+sx+2][py+2]=1;
			solve(n,m-2,sx+2,1,tx,ty-2,px,py+2);
		}
	}else if(n>5&&sx==2&&tx>3){
		if(sy>1){
			for(int i=sy;i<m;i++)to[px+2][py+i]=1;
			to[px+2][py+m]=0;
			for(int i=m;i>1;i--)to[px+1][py+i]=3;
			to[px+1][py+1]=2;
			for(int i=1;i<sy-1;i++)to[px+2][py+i]=1;
			to[px+2][py+sy-1]=2;
			solve(n-2,m,1,sy-1,tx-2,ty,px+2,py);
		}else{
			for(int i=sy;i>1;i--)to[px+2][py+i]=3;
			to[px+2][py+1]=0;
			for(int i=1;i<m;i++)to[px+1][py+i]=1;
			to[px+1][py+m]=2;
			for(int i=m;i>sy+1;i--)to[px+2][py+i]=3;
			to[px+2][py+sy+1]=2;
			solve(n-2,m,1,sy+1,tx-2,ty,px+2,py);
		}
	}else if(m>5&&sy==m-1&&ty<m-2){
		if(sx>1){
			for(int i=sx;i<n;i++)to[px+i][py+m-1]=2;
			to[px+n][py+m-1]=1;
			for(int i=n;i>1;i--)to[px+i][py+m]=0;
			to[px+1][py+m]=3;
			for(int i=1;i<sx-1;i++)to[px+i][py+m-1]=2;
			to[px+sx-1][py+m-1]=3;
			solve(n,m-2,sx-1,m-2,tx,ty,px,py);
		}else{
			for(int i=sx;i>1;i--)to[px+i][py+m-1]=0;
			to[px+1][py+m-1]=1;
			for(int i=1;i<n;i++)to[px+i][py+m]=2;
			to[px+n][py+m]=3;
			for(int i=n;i>sx+1;i--)to[px+i][py+m-1]=0;
			to[px+sx+1][py+m-1]=3;
			solve(n,m-2,sx+1,m-2,tx,ty,px,py);
		}
	}else if(n>5&&sx==n-1&&tx<n-2){
		if(sy>1){
			for(int i=sy;i<m;i++)to[px+n-1][py+i]=1;
			to[px+n-1][py+m]=2;
			for(int i=m;i>1;i--)to[px+n][py+i]=3;
			to[px+n][py+1]=0;
			for(int i=1;i<sy-1;i++)to[px+n-1][py+i]=1;
			to[px+n-1][py+sy-1]=0;
			solve(n-2,m,n-2,sy-1,tx,ty,px,py);
		}else{
			for(int i=sy;i>1;i--)to[px+n-1][py+i]=3;
			to[px+n-1][py+1]=2;
			for(int i=1;i<m;i++)to[px+n][py+i]=1;
			to[px+n][py+m]=0;
			for(int i=m;i>sy+1;i--)to[px+n-1][py+i]=3;
			to[px+n-1][py+sy+1]=0;
			solve(n-2,m,n-2,sy+1,tx,ty,px,py);
		}
	}else if(m>5&&sy==2&&ty>3){
		if(sx>1){
			for(int i=sx;i<n;i++)to[px+i][py+2]=2;
			to[px+n][py+2]=3;
			for(int i=n;i>1;i--)to[px+i][py+1]=0;
			to[px+1][py+1]=1;
			for(int i=1;i<sx-1;i++)to[px+i][py+2]=2;
			to[px+sx-1][py+2]=1;
			solve(n,m-2,sx-1,1,tx,ty-2,px,py+2);
		}else{
			for(int i=sx;i>1;i--)to[px+i][py+2]=0;
			to[px+1][py+2]=3;
			for(int i=1;i<n;i++)to[px+i][py+1]=2;
			to[px+n][py+1]=1;
			for(int i=n;i>sx+1;i--)to[px+i][py+2]=0;
			to[px+sx+1][py+2]=1;
			solve(n,m-2,sx+1,1,tx,ty-2,px,py+2);
		}
	}else assert(0);
}
int main(){
	int n,m,sx,sy,tx,ty;
	scanf("%d%d%d%d%d%d",&n,&m,&sx,&sy,&tx,&ty);
	if(((sx+sy)%2==(tx+ty)%2)!=n*m%2)return puts("NIE"),0;
	memset(to,-1,sizeof(to));
	solve(n,m,sx,sy,tx,ty,0,0);
	if(!ans)return puts("NIE"),0;
	for(int i=1;i<=n;i++)for(int j=1;j<=m;j++)if(i!=tx||j!=ty)assert(to[i][j]>=0&&to[i][j]<4);
//	for(int i=1;i<=n;i++,puts(""))for(int j=1;j<=m;j++)
//		if(to[i][j]==0)printf("↑");
//		else if(to[i][j]==1)printf("→");
//		else if(to[i][j]==2)printf("↓");
//		else if(to[i][j]==3)printf("←");
//		else printf("〇");
	int x=sx,y=sy;
	while(x!=tx||y!=ty){
		int k=to[x][y];
		putchar(ch[k]);
		x+=dx[k],y+=dy[k];
	}
	putchar('\n');
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 4ms
memory: 7508kb

input:

4 4
1 1
1 4

output:

DDPPGLGPPDDDLLL

result:

ok correct path

Test #2:

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

input:

4 4
3 2
2 3

output:

NIE

result:

ok no solution

Test #3:

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

input:

5 5
1 2
1 4

output:

NIE

result:

ok no solution

Test #4:

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

input:

6 6
1 1
1 4

output:

DDPPGLGPPPPDDDLGGLDDLLDPPPPDLLLLLGG

result:

ok correct path

Test #5:

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

input:

4 5
2 3
3 5


output:

GPDPGGLLLDDDDPGPPDL

result:

ok correct path

Test #6:

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

input:

4 6
1 2
2 5

output:

NIE

result:

ok no solution

Test #7:

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

input:

6 6
1 5
4 5

output:

DPGGLGGGPPPPPDDDDDLGGGGLLLDPPDLDDPG

result:

ok correct path

Test #8:

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

input:

38 6
33 5
36 5

output:

DPGGLGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGLDDDDLGGGGGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDDDDDLGGGGLLLDPPDLDDPG

result:

ok correct path

Test #9:

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

input:

57 6
26 3
29 5

output:

GPPPPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGGGPDDDDPGGG...

result:

ok correct path

Test #10:

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

input:

64 126
45 13
48 15


output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLL...

result:

ok correct path

Test #11:

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

input:

64 32
35 13
48 15


output:

GGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGG...

result:

ok correct path

Test #12:

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

input:

7 6
2 6
6 3


output:

LGGGGGPPPPPPDLLLLLDDDPDPPPPGLLLGLGPPDPPGL

result:

ok correct path

Test #13:

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

input:

7 6
7 3
2 5


output:

LDPDDLGLDLGGPGLLLGPPPPPGLLLLLLDDDDDPPGGLD

result:

ok correct path

Test #14:

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

input:

7 6
6 3
2 4


output:

DPGGGLDLGLDDPDLLGLGPGLLDDDDDPPPPPPGLLLLLG

result:

ok correct path

Test #15:

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

input:

7 6
5 1
1 4


output:

PPDDDLGGLDDLLDPPPPDLLLLLLGPGGGPDPGGLLLDDD

result:

ok correct path

Test #16:

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

input:

880 584
174 341
325 562

output:

NIE

result:

ok no solution

Test #17:

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

input:

967 756
949 395
377 19

output:

NIE

result:

ok no solution

Test #18:

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

input:

712 45
178 32
483 32

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #19:

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

input:

7 8
5 1
1 8


output:

PPDDDDDDDLGGGGGGLLGLLLDPPDPPDLLLGLDDDDPPPGLLGPPPDDDLLLL

result:

ok correct path

Test #20:

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

input:

8 9
3 1
1 8


output:

PPPPPDDDDDDDDLGGGGGGGLDDDDDDDLGGGGGGGLLLGLDDDPGPPDLDPDDDDLGGGLGLDDPDDLG

result:

ok correct path

Test #21:

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

input:

201 612
48 527
187 381

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #22:

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

input:

267 772
169 633
3 764

output:

LDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #23:

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

input:

601 125
583 3
124 124

output:

LDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #24:

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

input:

683 73
399 68
138 11

output:

NIE

result:

ok no solution

Test #25:

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

input:

624 43
603 9
15 31

output:

NIE

result:

ok no solution

Test #26:

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

input:

306 48
225 8
199 30

output:

NIE

result:

ok no solution

Test #27:

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

input:

505 121
408 87
80 115

output:

NIE

result:

ok no solution

Test #28:

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

input:

561 984
276 114
60 403

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPGGGGGGGGG...

result:

ok correct path

Test #29:

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

input:

674 732
486 255
180 24

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #30:

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

input:

136 961
7 45
106 317

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #31:

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

input:

848 52
839 17
639 30

output:

PDLLGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #32:

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

input:

10 249
1 201
1 113

output:

NIE

result:

ok no solution

Test #33:

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

input:

568 561
300 150
522 296

output:

NIE

result:

ok no solution

Test #34:

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

input:

118 145
79 40
5 49

output:

DDDDDDDDDPGGGGGGGGGGLLLDPDDDDDDDDDLGGGGGGGGLLDPDDDDDDDLGGGGGGLLDPDDDDDLGGGGLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPD...

result:

ok correct path

Test #35:

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

input:

365 970
359 157
151 266

output:

LDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #36:

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

input:

142 455
68 376
95 287

output:

NIE

result:

ok no solution

Test #37:

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

input:

10 687
2 298
2 86

output:

NIE

result:

ok no solution

Test #38:

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

input:

245 653
227 229
135 478

output:

NIE

result:

ok no solution

Test #39:

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

input:

358 807
122 766
231 236

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #40:

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

input:

509 575
165 337
197 9

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #41:

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

input:

858 97
132 7
211 12

output:

NIE

result:

ok no solution

Test #42:

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

input:

534 418
262 390
80 322

output:

NIE

result:

ok no solution

Test #43:

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

input:

546 834
393 126
326 451

output:

NIE

result:

ok no solution

Test #44:

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

input:

63 455
18 198
1 53

output:

PDLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #45:

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

input:

48 99
2 17
45 81

output:

GPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #46:

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

input:

87 94
31 62
6 10

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #47:

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

input:

919 743
39 559
195 734

output:

NIE

result:

ok no solution

Test #48:

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

input:

802 44
372 6
303 43

output:

NIE

result:

ok no solution

Test #49:

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

input:

993 325
356 174
100 65

output:

NIE

result:

ok no solution

Test #50:

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

input:

999 937
570 40
820 415

output:

NIE

result:

ok no solution

Test #51:

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

input:

510 116
143 41
424 12

output:

NIE

result:

ok no solution

Test #52:

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

input:

271 388
205 336
240 195

output:

NIE

result:

ok no solution

Test #53:

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

input:

567 555
556 528
328 211

output:

NIE

result:

ok no solution

Test #54:

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

input:

572 939
227 830
245 45

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #55:

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

input:

157 269
53 16
56 144

output:

NIE

result:

ok no solution

Test #56:

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

input:

263 766
107 356
238 389

output:

NIE

result:

ok no solution

Test #57:

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

input:

154 507
52 12
52 59

output:

PPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #58:

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

input:

200 626
191 337
47 262

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPD...

result:

ok correct path

Test #59:

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

input:

738 613
114 396
538 66

output:

NIE

result:

ok no solution

Test #60:

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

input:

276 290
265 119
69 262

output:

PDLLGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #61:

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

input:

355 272
336 215
14 71

output:

NIE

result:

ok no solution

Test #62:

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

input:

347 191
233 64
100 7

output:

NIE

result:

ok no solution

Test #63:

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

input:

39 154
18 24
13 147

output:

NIE

result:

ok no solution

Test #64:

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

input:

574 339
137 190
25 199

output:

DDDDDDDDDPGGGGGGGGGGLLLDPDDDDDDDDDLGGGGGGGGLLDPDDDDDDDLGGGGGGLLDPDDDDDLGGGGLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPD...

result:

ok correct path

Test #65:

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

input:

559 250
184 43
542 191

output:

NIE

result:

ok no solution

Test #66:

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

input:

783 628
109 143
679 213

output:

NIE

result:

ok no solution

Test #67:

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

input:

43 533
8 481
8 434

output:

NIE

result:

ok no solution

Test #68:

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

input:

32 743
6 505
20 11

output:

NIE

result:

ok no solution

Test #69:

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

input:

833 858
769 606
774 440

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #70:

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

input:

888 12
695 11
76 1

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #71:

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

input:

593 412
501 306
414 22

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #72:

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

input:

491 126
163 28
302 24

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #73:

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

input:

128 440
100 195
18 199

output:

NIE

result:

ok no solution

Test #74:

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

input:

548 412
498 267
127 214

output:

NIE

result:

ok no solution

Test #75:

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

input:

228 695
38 68
104 292

output:

NIE

result:

ok no solution

Test #76:

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

input:

590 20
329 13
188 10

output:

NIE

result:

ok no solution

Test #77:

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

input:

376 676
209 567
83 578

output:

PDLLGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #78:

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

input:

219 681
208 243
85 54

output:

NIE

result:

ok no solution

Test #79:

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

input:

549 498
339 110
121 63

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #80:

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

input:

401 202
31 22
290 67

output:

NIE

result:

ok no solution

Test #81:

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

input:

156 299
101 60
107 63

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #82:

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

input:

948 160
945 79
459 76

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #83:

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

input:

488 808
359 119
336 401

output:

PDLLGLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #84:

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

input:

144 811
4 115
141 21

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #85:

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

input:

727 324
531 92
213 247

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #86:

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

input:

983 971
236 693
22 930

output:

NIE

result:

ok no solution

Test #87:

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

input:

185 640
161 536
104 308

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #88:

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

input:

36 273
34 147
30 119

output:

NIE

result:

ok no solution

Test #89:

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

input:

122 381
86 318
22 326

output:

NIE

result:

ok no solution

Test #90:

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

input:

131 243
2 41
80 54

output:

NIE

result:

ok no solution

Test #91:

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

input:

32 664
15 435
19 197

output:

NIE

result:

ok no solution

Test #92:

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

input:

558 704
47 579
104 703

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #93:

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

input:

182 794
160 183
157 379

output:

DLGLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGP...

result:

ok correct path

Test #94:

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

input:

926 916
918 318
917 686

output:

PPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLG...

result:

ok correct path

Test #95:

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

input:

434 360
351 120
5 185

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #96:

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

input:

292 480
193 30
268 293

output:

NIE

result:

ok no solution

Test #97:

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

input:

619 528
152 354
35 164

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #98:

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

input:

348 594
178 239
61 514

output:

NIE

result:

ok no solution

Test #99:

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

input:

263 95
155 87
209 28

output:

NIE

result:

ok no solution

Test #100:

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

input:

296 120
140 89
260 52

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #101:

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

input:

690 593
138 190
637 579

output:

NIE

result:

ok no solution

Test #102:

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

input:

802 49
132 23
449 5

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #103:

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

input:

788 47
175 4
621 3

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #104:

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

input:

154 994
89 933
128 540

output:

NIE

result:

ok no solution

Test #105:

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

input:

898 768
653 515
829 651

output:

NIE

result:

ok no solution

Test #106:

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

input:

445 933
221 471
422 869

output:

NIE

result:

ok no solution

Test #107:

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

input:

685 529
162 1
340 414

output:

NIE

result:

ok no solution

Test #108:

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

input:

223 827
10 541
138 219

output:

NIE

result:

ok no solution

Test #109:

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

input:

189 453
87 140
95 24

output:

NIE

result:

ok no solution

Test #110:

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

input:

624 89
242 19
521 15

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #111:

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

input:

486 735
105 477
139 496

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #112:

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

input:

800 313
184 116
212 280

output:

NIE

result:

ok no solution

Test #113:

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

input:

494 883
175 90
134 506

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #114:

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

input:

845 436
726 103
539 382

output:

NIE

result:

ok no solution

Test #115:

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

input:

309 275
159 260
108 185

output:

NIE

result:

ok no solution

Test #116:

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

input:

540 807
325 588
131 323

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #117:

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

input:

910 838
807 658
724 584

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #118:

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

input:

75 464
39 314
40 461

output:

NIE

result:

ok no solution

Test #119:

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

input:

279 14
42 10
234 13

output:

DDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGGGGGLDDDDDDDDDDDDLGGGGGGGGG...

result:

ok correct path

Test #120:

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

input:

811 644
483 370
471 336

output:

NIE

result:

ok no solution

Test #121:

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

input:

761 823
672 292
570 537

output:

NIE

result:

ok no solution

Test #122:

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

input:

201 149
51 29
187 18

output:

NIE

result:

ok no solution

Test #123:

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

input:

441 41
378 12
36 15

output:

NIE

result:

ok no solution

Test #124:

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

input:

21 510
11 58
18 81

output:

NIE

result:

ok no solution

Test #125:

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

input:

949 375
308 210
282 225

output:

NIE

result:

ok no solution

Test #126:

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

input:

759 763
553 42
160 727

output:

NIE

result:

ok no solution

Test #127:

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

input:

236 958
78 937
84 796

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #128:

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

input:

722 134
14 59
606 46

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #129:

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

input:

809 800
723 380
789 198

output:

NIE

result:

ok no solution

Test #130:

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

input:

531 648
37 131
420 81

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #131:

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

input:

689 470
425 192
368 67

output:

NIE

result:

ok no solution

Test #132:

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

input:

967 92
543 81
397 28

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #133:

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

input:

513 388
353 186
318 7

output:

NIE

result:

ok no solution

Test #134:

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

input:

553 720
252 434
550 15

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #135:

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

input:

360 932
116 900
118 545

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #136:

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

input:

862 527
52 339
473 119

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #137:

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

input:

380 215
295 55
244 156

output:

NIE

result:

ok no solution

Test #138:

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

input:

197 281
77 108
115 121

output:

NIE

result:

ok no solution

Test #139:

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

input:

125 194
7 188
29 47

output:

DDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #140:

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

input:

840 421
277 385
175 215

output:

NIE

result:

ok no solution

Test #141:

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

input:

245 270
236 243
207 164

output:

NIE

result:

ok no solution

Test #142:

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

input:

660 242
51 219
89 137

output:

NIE

result:

ok no solution

Test #143:

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

input:

157 425
55 399
53 55

output:

PPGLLLDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #144:

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

input:

676 505
43 363
481 88

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #145:

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

input:

610 532
288 331
1 275

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDD...

result:

ok correct path

Test #146:

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

input:

158 327
67 70
78 180

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #147:

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

input:

11 382
8 7
6 284

output:

PDLLGLGPPPGLLLGPPPGLLLGPPPPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #148:

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

input:

874 12
106 7
72 10

output:

LDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLLDPDDLGLDLGGPGLLDDDLGLGPGLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #149:

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

input:

863 722
692 328
124 121

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #150:

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

input:

996 262
376 123
512 112

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #151:

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

input:

343 379
239 172
314 265

output:

NIE

result:

ok no solution

Test #152:

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

input:

27 737
6 314
14 647

output:

NIE

result:

ok no solution

Test #153:

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

input:

23 994
17 502
20 802

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #154:

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

input:

109 93
6 90
80 86

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #155:

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

input:

518 882
247 6
464 608

output:

GGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #156:

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

input:

727 440
553 219
84 123

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDD...

result:

ok correct path

Test #157:

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

input:

611 660
516 179
235 137

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #158:

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

input:

792 533
346 91
782 450

output:

GPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #159:

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

input:

173 134
108 61
123 63

output:

GPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLGPPPPPPPPPPP...

result:

ok correct path

Test #160:

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

input:

781 911
349 802
497 416

output:

NIE

result:

ok no solution

Test #161:

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

input:

259 312
204 154
117 145

output:

NIE

result:

ok no solution

Test #162:

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

input:

278 905
108 812
33 796

output:

DLGGPGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGLDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGLDDDDDDDDDDDLDLGGPGGGGGGGGGGLDDDDDDDDDLDLGGPGGGGGGGGLDDDDDDDLDLGGPGGGGGGLDDDDDLDLGGPGGGGLDDDLDLGGPGGLDLGLDDPDDLGLDLGGPGGLDLGLDDPDDLGLDLGGPGGLDLGLDDPDDLGLDLGGPGGLDLGLDDPDDLGLDLGGPGGLDLGLDDPDDLGLDLGGPGGLDLGLDDPDDL...

result:

ok correct path

Test #163:

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

input:

290 514
156 101
134 53

output:

NIE

result:

ok no solution

Test #164:

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

input:

200 318
85 64
130 226

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #165:

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

input:

50 23
22 22
3 5

output:

NIE

result:

ok no solution

Test #166:

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

input:

403 155
68 133
46 89

output:

NIE

result:

ok no solution

Test #167:

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

input:

694 361
515 221
616 55

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #168:

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

input:

101 593
61 107
5 591

output:

LDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #169:

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

input:

892 255
683 205
336 52

output:

NIE

result:

ok no solution

Test #170:

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

input:

866 777
40 507
687 84

output:

NIE

result:

ok no solution

Test #171:

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

input:

467 374
248 280
132 186

output:

NIE

result:

ok no solution

Test #172:

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

input:

423 251
138 1
108 6

output:

NIE

result:

ok no solution

Test #173:

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

input:

681 586
678 580
678 392

output:

NIE

result:

ok no solution

Test #174:

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

input:

455 969
25 65
411 756

output:

NIE

result:

ok no solution

Test #175:

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

input:

614 304
413 93
290 8

output:

NIE

result:

ok no solution

Test #176:

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

input:

202 155
25 78
159 103

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #177:

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

input:

729 84
381 33
537 52

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #178:

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

input:

415 982
109 364
233 582

output:

NIE

result:

ok no solution

Test #179:

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

input:

966 505
581 211
871 188

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPP...

result:

ok correct path

Test #180:

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

input:

278 799
68 589
57 343

output:

GLDLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #181:

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

input:

252 182
241 81
4 48

output:

NIE

result:

ok no solution

Test #182:

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

input:

851 155
480 14
750 41

output:

NIE

result:

ok no solution

Test #183:

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

input:

9 657
9 335
8 260

output:

GLDLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLLLDPPPDLL...

result:

ok correct path

Test #184:

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

input:

728 808
46 34
547 806

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #185:

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

input:

105 704
98 638
18 669

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGLLDPDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGG...

result:

ok correct path

Test #186:

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

input:

505 804
428 300
189 447

output:

NIE

result:

ok no solution

Test #187:

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

input:

154 274
94 268
94 89

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #188:

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

input:

976 526
938 456
671 390

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #189:

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

input:

834 52
29 31
522 26

output:

NIE

result:

ok no solution

Test #190:

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

input:

125 566
86 309
74 208

output:

PDLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #191:

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

input:

995 432
895 156
466 50

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #192:

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

input:

767 955
610 194
199 916

output:

NIE

result:

ok no solution

Test #193:

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

input:

307 73
225 12
202 73

output:

NIE

result:

ok no solution

Test #194:

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

input:

187 722
163 179
120 678

output:

NIE

result:

ok no solution

Test #195:

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

input:

652 611
202 378
244 1

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #196:

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

input:

969 165
884 22
622 125

output:

NIE

result:

ok no solution

Test #197:

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

input:

888 321
380 14
478 297

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #198:

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

input:

413 927
401 222
318 484

output:

NIE

result:

ok no solution

Test #199:

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

input:

697 520
621 183
652 462

output:

NIE

result:

ok no solution

Test #200:

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

input:

258 236
114 26
23 182

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #201:

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

input:

944 932
929 480
601 137

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #202:

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

input:

661 691
525 577
122 581

output:

NIE

result:

ok no solution

Test #203:

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

input:

704 668
205 369
289 258

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDP...

result:

ok correct path

Test #204:

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

input:

572 618
548 32
478 376

output:

NIE

result:

ok no solution

Test #205:

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

input:

491 587
410 273
167 484

output:

NIE

result:

ok no solution

Test #206:

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

input:

309 165
223 8
221 112

output:

NIE

result:

ok no solution

Test #207:

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

input:

13 418
10 406
6 126

output:

NIE

result:

ok no solution

Test #208:

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

input:

992 492
965 18
330 382

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #209:

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

input:

879 708
66 674
828 203

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #210:

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

input:

486 876
465 311
444 534

output:

NIE

result:

ok no solution

Test #211:

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

input:

326 65
246 10
10 46

output:

NIE

result:

ok no solution

Test #212:

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

input:

739 298
114 1
640 253

output:

NIE

result:

ok no solution

Test #213:

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

input:

310 998
223 823
240 553

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #214:

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

input:

17 300
11 50
2 163

output:

NIE

result:

ok no solution

Test #215:

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

input:

403 366
53 268
29 46

output:

NIE

result:

ok no solution

Test #216:

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

input:

832 559
591 426
168 227

output:

NIE

result:

ok no solution

Test #217:

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

input:

204 458
147 188
25 61

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #218:

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

input:

787 79
681 17
244 63

output:

NIE

result:

ok no solution

Test #219:

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

input:

768 341
475 179
556 278

output:

NIE

result:

ok no solution

Test #220:

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

input:

265 596
229 400
174 395

output:

NIE

result:

ok no solution

Test #221:

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

input:

647 135
247 112
265 25

output:

NIE

result:

ok no solution

Test #222:

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

input:

554 439
236 102
92 202

output:

NIE

result:

ok no solution

Test #223:

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

input:

754 383
334 280
164 156

output:

NIE

result:

ok no solution

Test #224:

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

input:

256 113
2 90
135 75

output:

NIE

result:

ok no solution

Test #225:

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

input:

633 289
580 238
627 25

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #226:

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

input:

984 176
925 22
244 27

output:

NIE

result:

ok no solution

Test #227:

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

input:

490 33
91 26
296 8

output:

DDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #228:

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

input:

820 615
312 369
540 593

output:

NIE

result:

ok no solution

Test #229:

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

input:

64 317
10 21
23 172

output:

NIE

result:

ok no solution

Test #230:

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

input:

338 128
234 98
186 112

output:

NIE

result:

ok no solution

Test #231:

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

input:

706 69
662 69
47 23

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #232:

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

input:

997 520
74 460
987 338

output:

DPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #233:

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

input:

125 45
59 14
57 2

output:

NIE

result:

ok no solution

Test #234:

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

input:

343 387
209 288
75 362

output:

NIE

result:

ok no solution

Test #235:

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

input:

340 759
328 48
276 417

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #236:

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

input:

249 750
162 747
68 610

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #237:

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

input:

47 215
9 153
10 214

output:

DPGGLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #238:

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

input:

899 604
859 221
610 572

output:

NIE

result:

ok no solution

Test #239:

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

input:

967 811
583 240
205 119

output:

NIE

result:

ok no solution

Test #240:

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

input:

836 825
283 238
263 678

output:

NIE

result:

ok no solution

Test #241:

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

input:

366 720
304 142
362 346

output:

NIE

result:

ok no solution

Test #242:

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

input:

989 343
91 70
480 171

output:

NIE

result:

ok no solution

Test #243:

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

input:

248 850
48 427
194 625

output:

NIE

result:

ok no solution

Test #244:

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

input:

277 852
91 620
17 789

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #245:

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

input:

381 892
33 235
344 143

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #246:

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

input:

158 554
48 485
103 363

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #247:

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

input:

509 49
181 27
17 19

output:

GLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #248:

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

input:

896 320
190 72
627 234

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #249:

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

input:

368 464
366 371
162 82

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDD...

result:

ok correct path

Test #250:

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

input:

512 423
170 376
79 411

output:

NIE

result:

ok no solution

Test #251:

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

input:

238 253
42 42
12 93

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLGLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLGLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #252:

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

input:

132 651
108 642
74 45

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #253:

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

input:

168 268
39 88
151 251

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #254:

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

input:

409 178
26 74
3 46

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #255:

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

input:

315 641
292 604
126 248

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #256:

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

input:

284 353
200 124
57 157

output:

NIE

result:

ok no solution

Test #257:

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

input:

904 862
669 414
543 424

output:

NIE

result:

ok no solution

Test #258:

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

input:

806 596
663 72
544 376

output:

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

result:

ok correct path

Test #259:

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

input:

654 431
373 289
438 388

output:

NIE

result:

ok no solution

Test #260:

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

input:

728 434
700 80
60 126

output:

NIE

result:

ok no solution

Test #261:

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

input:

249 296
81 186
38 240

output:

GLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLGLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLGLDDPDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #262:

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

input:

376 59
366 12
193 23

output:

NIE

result:

ok no solution

Test #263:

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

input:

149 563
26 22
87 192

output:

NIE

result:

ok no solution

Test #264:

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

input:

447 153
300 70
36 78

output:

DDDDDDDDDPGGGGGGGGGGLLLDPDDDDDDDDDLGGGGGGGGLLDPDDDDDDDLGGGGGGLLDPDDDDDLGGGGLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPDDDLGGLDDLGGGPGLLLDPD...

result:

ok correct path

Test #265:

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

input:

477 151
110 116
350 30

output:

DDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #266:

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

input:

764 57
708 10
738 15

output:

DDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLL...

result:

ok correct path

Test #267:

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

input:

457 449
63 392
333 141

output:

NIE

result:

ok no solution

Test #268:

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

input:

19 155
13 111
17 118

output:

NIE

result:

ok no solution

Test #269:

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

input:

216 489
44 3
200 323

output:

NIE

result:

ok no solution

Test #270:

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

input:

875 161
642 31
854 113

output:

NIE

result:

ok no solution

Test #271:

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

input:

293 810
81 314
91 319

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #272:

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

input:

200 553
112 302
9 234

output:

DLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDLGGPGGGGGGGGGGGGGGG...

result:

ok correct path

Test #273:

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

input:

475 874
71 582
183 717

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #274:

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

input:

221 20
203 20
87 17

output:

LGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDDPDLLLGPGGLDLGLDD...

result:

ok correct path

Test #275:

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

input:

22 277
15 91
15 64

output:

GPDDLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDPPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLLLLGPPPPPPGLLLL...

result:

ok correct path

Test #276:

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

input:

172 498
113 364
52 330

output:

PGLLDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok correct path

Test #277:

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

input:

366 317
118 99
115 181

output:

DLGLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPGLLGPPPDDDD...

result:

ok correct path

Test #278:

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

input:

754 626
698 412
529 409

output:

NIE

result:

ok no solution

Test #279:

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

input:

880 67
280 54
642 63

output:

DDDDDDDDDDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path

Test #280:

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

input:

62 617
25 432
60 508

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

result:

ok correct path

Test #281:

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

input:

319 113
140 49
132 51

output:

NIE

result:

ok no solution

Test #282:

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

input:

478 125
69 42
73 47

output:

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLDDDDDDDDDDD...

result:

ok correct path

Test #283:

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

input:

529 278
201 57
33 217

output:

NIE

result:

ok no solution

Test #284:

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

input:

713 452
326 374
126 94

output:

NIE

result:

ok no solution

Test #285:

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

input:

313 547
292 414
116 336

output:

PDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

result:

ok correct path