QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#659577#9478. Shift Puzzleucup-team130#AC ✓7ms4208kbC++175.9kb2024-10-19 20:46:262024-10-19 20:46:26

详细

Test #1:

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

input:

3
.#.
#.#
.#.
#.#
...
#.#

output:

Yes
9
2 1
2 2
2 3
1 2
2 2
2 3
1 2
1 2
2 1

result:

ok AC

Test #2:

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

input:

3
.#.
#.#
.#.
.#.
#.#
.#.

output:

Yes
14
1 2
1 1
2 3
1 1
1 1
1 2
2 3
1 3
2 3
1 1
1 3
1 1
1 2
1 2

result:

ok AC

Test #3:

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

input:

13
.............
....#####....
......#......
......#......
......#......
......#......
.............
....#...#....
....#...#....
....#...#....
....#...#....
.....###.....
.............
....####.....
....#...#....
....####.....
....#........
....#........
.............
.....###.....
....#...#....
......

output:

No

result:

ok AC

Test #4:

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

input:

3
#.#
#.#
###
#.#
.#.
###

output:

No

result:

ok AC

Test #5:

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

input:

4
.#..
.#..
....
...#
....
..#.
#...
....

output:

No

result:

ok AC

Test #6:

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

input:

4
....
....
....
.#..
..##
##.#
####
..##

output:

No

result:

ok AC

Test #7:

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

input:

2
..
..
..
..

output:

Yes
2
2 1
2 2

result:

ok AC

Test #8:

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

input:

3
.##
##.
.#.
##.
..#
.##

output:

Yes
16
1 2
1 2
2 1
1 3
1 1
2 1
1 1
2 1
1 1
1 3
2 1
1 1
2 1
1 1
1 1
1 1

result:

ok AC

Test #9:

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

input:

3
...
#..
..#
...
#..
#..

output:

Yes
13
2 2
2 3
2 2
1 1
2 1
2 3
2 1
1 1
2 1
2 1
1 1
1 1
2 1

result:

ok AC

Test #10:

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

input:

3
..#
.##
###
#.#
.##
#.#

output:

Yes
13
1 2
1 1
2 3
1 1
2 3
1 1
1 2
1 3
1 3
2 3
2 3
1 1
1 1

result:

ok AC

Test #11:

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

input:

4
....
#...
...#
#.#.
#...
....
.#..
.##.

output:

Yes
22
2 1
2 2
2 3
2 4
2 1
2 4
2 4
1 2
2 2
1 2
2 1
2 2
2 3
1 2
2 3
2 3
2 3
1 2
1 2
1 2
2 3
2 3

result:

ok AC

Test #12:

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

input:

4
#.#.
##..
....
#..#
....
...#
.#.#
#.##

output:

Yes
16
2 1
2 2
2 3
2 3
2 3
1 1
2 1
2 2
2 1
2 2
1 1
1 1
2 4
2 4
1 1
2 4

result:

ok AC

Test #13:

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

input:

2
.#
.#
#.
#.

output:

Yes
2
1 1
1 2

result:

ok AC

Test #14:

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

input:

3
##.
.##
...
...
#..
###

output:

Yes
8
2 1
2 2
2 2
1 1
2 3
2 3
1 1
2 1

result:

ok AC

Test #15:

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

input:

3
.#.
##.
.#.
#.#
..#
#..

output:

Yes
8
1 1
1 3
1 3
2 2
1 2
1 2
2 2
1 1

result:

ok AC

Test #16:

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

input:

3
#.#
#..
#..
.#.
.##
.#.

output:

Yes
9
1 2
2 1
1 2
1 3
2 1
1 1
1 1
2 1
1 3

result:

ok AC

Test #17:

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

input:

4
####
#..#
...#
.#..
....
.##.
###.
#.##

output:

Yes
16
2 1
2 3
2 4
2 4
1 1
2 1
2 2
2 3
2 4
2 1
2 2
1 1
2 2
1 1
1 1
2 3

result:

ok AC

Test #18:

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

input:

4
.#.#
##..
.#.#
.##.
#.#.
..##
#.#.
#..#

output:

Yes
16
1 1
1 3
1 4
1 1
1 3
1 1
1 3
2 2
1 2
1 2
2 2
1 4
1 4
2 2
2 2
1 2

result:

ok AC

Test #19:

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

input:

19
.######.######..###
...###.##.###.#####
.#.####..#.##...###
.#####.##.######.##
.##.#############..
.#.....##..#.##.#.#
#####.###..#.###.##
#.####.#...##..#.##
.######.##.##..####
.#.###.###.###..###
#######.###.#..###.
#####.###.####.##.#
..#.######..###..#.
#.#.#..####..###.#.
########.####..##...

output:

No

result:

ok AC

Test #20:

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

input:

21
#####################
#####################
#####################
#####################
#####################
#####################
#####################
#########.###########
#####################
#####################
#####################
#####################
#####################
###########...

output:

No

result:

ok AC

Test #21:

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

input:

26
##.###....#######.....#...
.#.##.#####..#..#..###.###
.#.#####.##.##.#.#.##.#..#
###.###...##...#.#....#.#.
.##..###..#.##.#.##..#.#.#
#..##...##.#...####...####
##.#..###.#.####...###....
.##..#..##.##..#.##...#.##
####.###..#.#####..#####..
.#.#.##..###.###..###.####
##.##.#..#..#....###..###.
...

output:

No

result:

ok AC

Test #22:

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

input:

35
####.##.###.####..##.##############
####.####.##############.######.###
###########..######.###.######.###.
#.#.####.##.#####...###############
################.#####.############
#######...#.####.###..######.######
#.##.#############.####.######.#.##
##..####.####.#####################
#####.##....

output:

Yes
1522
2 1
2 2
2 7
2 9
2 10
2 12
2 15
2 16
2 17
2 18
2 20
2 22
2 23
2 24
2 25
2 26
2 27
2 29
2 30
2 32
2 35
2 1
2 2
2 15
2 17
2 20
2 22
2 25
2 26
2 29
2 30
2 32
2 35
2 2
2 15
2 20
2 22
2 25
2 26
2 29
2 30
2 32
2 35
2 15
2 25
2 26
2 29
2 32
2 35
2 15
2 25
2 32
2 35
2 15
2 25
2 32
2 15
2 25
2 15
2 1...

result:

ok AC

Test #23:

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

input:

34
.........#.................#......
...#.#............................
..........#.............#.........
.................................#
.......#..........................
..................................
.......................#..........
.................#................
....................

output:

Yes
1171
2 1
2 2
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
2 13
2 14
2 15
2 16
2 18
2 19
2 20
2 21
2 22
2 23
2 24
2 25
2 26
2 27
2 28
2 29
2 30
2 31
2 32
2 33
2 34
2 1
2 2
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 13
2 14
2 15
2 16
2 18
2 22
2 23
2 24
2 25
2 26
2 27
2 28
2 29
2 30
2 31
2 32
2 33
2 34
2 1
2 4...

result:

ok AC

Test #24:

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

input:

23
####.####.#.#.#########
..####.##.##.###.######
#.###...#.#.###.###.###
###.#####.####..#######
#.#...##.######..#.#.##
.####.##.###########..#
##.#....##..###.#.#..##
##.#.####...##.###..#.#
##.###..###########.###
###.###..###.#.#.#.##.#
#.####.###..##.#####..#
###.######.##.####..#.#
.###.####...

output:

Yes
638
1 3
1 5
1 7
1 8
1 10
1 11
1 12
1 13
1 15
1 16
1 17
1 22
1 3
1 7
1 10
1 11
1 13
1 15
1 16
1 17
1 22
1 7
1 10
1 16
1 17
1 22
1 10
1 16
1 17
1 10
1 16
1 17
2 1
1 2
1 3
1 6
1 8
1 10
1 12
1 13
1 14
1 15
1 19
1 20
1 22
1 2
1 3
1 13
1 19
1 20
1 22
1 13
1 19
1 22
1 22
1 22
2 1
1 3
1 4
1 7
1 9
1 11
1...

result:

ok AC

Test #25:

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

input:

20
#....###......##...#
.......##...#...#..#
......#.....#.#.....
..#....##.#..#.#....
#..#...#.#...##.#...
...#...#...##.....#.
#####.#........#....
....##...#.#..#.....
.#.#........#....#..
.#.#.###...#........
#.....#..##.##......
##....##..#.........
.#.#..............#.
#..............#..#.
##....

output:

Yes
463
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 13
1 14
1 15
1 19
1 20
1 5
1 6
1 7
1 9
1 13
1 14
1 15
1 20
1 5
1 7
1 9
1 13
1 14
1 20
1 7
1 9
1 13
1 13
1 13
1 13
1 13
1 13
2 13
1 2
1 4
1 5
1 6
1 8
1 9
1 10
1 12
1 13
1 14
1 16
1 17
1 19
1 20
1 2
1 5
1 6
1 8
1 9
1 10
1 12
1 13
1 14
1 17
1 19
1 2
1 5
1 6
1 9
1 ...

result:

ok AC

Test #26:

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

input:

12
##..#.......
.#.##.###.#.
##.#..#.####
##.###..###.
.#.#.##.#.##
##.###.#...#
#..###..####
..####.#####
#.#.##.##.#.
.#.##.####..
.#.....#####
###.#..##.#.
.##.#######.
..###.#.####
#.###...##..
.#...##.#.##
.#.#########
#...##.#.##.
.##.##...##.
..####.#.###
...#.#######
..#.......#.
..#.#..##.#...

output:

Yes
193
1 2
1 5
1 7
1 8
1 9
1 10
2 11
1 1
1 3
1 5
1 7
1 9
1 10
1 5
1 9
1 9
2 11
1 1
1 3
1 5
1 7
1 9
1 10
1 3
1 5
1 7
1 5
2 11
1 1
1 4
1 5
1 8
1 4
1 8
2 11
1 1
1 4
1 6
1 8
1 6
2 11
1 1
1 5
1 6
1 9
1 9
1 9
2 11
1 1
1 6
1 7
1 9
1 7
1 9
1 9
2 11
1 2
1 7
1 8
1 10
1 7
1 8
1 8
1 8
2 11
1 3
1 8
1 10
1 8
1 1...

result:

ok AC

Test #27:

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

input:

44
###...##.#....##.#####.##.##...####.##....##
#.#...##..#.#.##..#.###.......####..#..#..#.
..#.########..##.#.....##.....#..##...#.#.#.
#.#.##.#.#.#.#....#.#.######.#....#......###
#.#.#.##...##.#..#.#..#######.#.###..###.###
###..#...#...#........##..#...#.##..#..#..##
..##.#..#..#####......#..##...

output:

Yes
2851
1 1
1 2
1 6
1 11
1 13
1 20
1 22
1 27
1 34
1 37
1 40
1 41
1 42
1 43
1 1
1 13
1 20
1 27
1 37
1 41
1 42
1 43
1 20
1 42
1 43
1 43
2 37
1 1
1 2
1 7
1 8
1 9
1 10
1 13
1 14
1 15
1 19
1 21
1 22
1 24
1 25
1 27
1 28
1 29
1 31
1 33
1 34
1 36
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 2
1 7
1 8
1 9
1 10
1 13...

result:

ok AC

Test #28:

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

input:

10
##...#.#.#
###....###
#####.#...
....#....#
....#..##.
.#.#..##.#
##.##.#...
#..#..##.#
##..#.#.#.
######.#.#
..###.#.#.
...####...
.....#.###
####.####.
####.##..#
#.#.##..#.
..#..#.###
.##.##..#.
..##.#.#.#
......#.#.

output:

Yes
151
1 3
1 7
1 9
1 9
1 9
1 9
1 9
1 9
1 9
2 1
1 3
1 8
1 9
1 10
1 8
1 9
1 10
1 8
1 10
1 10
1 10
2 1
1 3
1 8
1 3
1 8
1 3
1 3
2 1
1 4
1 4
2 1
1 4
1 10
2 1
1 4
1 10
1 4
2 1
1 4
1 10
1 4
2 1
1 4
1 10
2 1
1 4
2 1
1 1
1 1
1 1
1 1
1 1
1 1
2 1
1 2
1 5
2 1
1 2
1 5
1 5
1 5
2 1
1 2
1 5
1 2
1 5
2 1
1 3
1 6
2 1...

result:

ok AC

Test #29:

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

input:

44
..#.#.###.#.....#...#.#####.....#....#.#....
####.....#..##...##..#.####.#.#..#..#..#####
#.###.##########.##.#####..#####.#.##....#.#
#..#.##.##..###..#...#.....###.##..##.#.##..
.####.#..##.###.#.###....#..#..######...#.#.
##...#.#.##.##..#.##.####.###.#..#####.#.###
.#..####...##.####.....##.....

output:

Yes
2865
1 3
1 8
1 10
1 11
1 12
1 16
1 19
1 23
1 24
1 32
1 39
1 10
1 12
1 16
1 23
1 32
1 10
1 23
2 33
1 1
1 2
1 3
1 6
1 7
1 12
1 14
1 15
1 18
1 21
1 22
1 25
1 27
1 28
1 31
1 32
1 33
1 34
1 36
1 41
1 42
1 43
1 2
1 6
1 14
1 15
1 18
1 21
1 22
1 27
1 28
1 32
1 42
1 2
1 6
1 18
1 27
1 32
1 2
1 6
1 18
1 27...

result:

ok AC

Test #30:

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

input:

10
###..#...#
#.##.##..#
#..#..##.#
..#..###..
#..###...#
.##.##.##.
.##..##...
#.###.##..
.#####....
.#...#.#.#
...##.###.
.#..#..##.
.##.##..#.
##.##...##
.##...###.
#..#..#..#
#..##..###
.#...#..##
#.....####
#.###.#.#.

output:

Yes
138
1 3
1 4
1 8
1 10
1 10
1 10
1 10
2 9
1 3
1 5
1 6
1 7
1 8
1 9
1 3
1 7
1 8
1 8
2 9
1 4
1 5
1 6
1 9
1 5
1 9
2 9
1 4
1 6
1 7
1 10
1 4
1 7
2 9
1 5
1 7
1 8
1 10
1 7
1 10
1 10
1 10
2 9
1 1
1 5
1 5
2 9
1 1
1 6
1 1
1 1
2 9
1 1
1 6
1 1
2 9
1 2
1 7
1 2
1 7
2 9
1 3
1 8
1 3
1 8
1 3
1 8
1 8
2 9
1 3
1 9
1 3...

result:

ok AC

Test #31:

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

input:

30
..#.#..#....##.#..###...##.#..
..###...#####.#..##.##......##
..###.#.####.....#...##..##.#.
#.#....####.#..##...##..###..#
#.##.#.........#.##.#.##......
#.##......##..#.######..##..##
###..#.##..##...#####.##..##.#
#####.#..#...###.....##..#.#.#
##..#.####.####....####......#
##.#..####.#..##.....

output:

Yes
1291
1 2
1 3
1 11
1 17
1 19
1 21
1 23
1 24
1 3
1 17
1 19
1 23
1 24
1 3
1 19
1 23
1 3
1 23
1 23
1 23
1 23
1 23
2 9
1 3
1 5
1 7
1 8
1 9
1 11
1 12
1 13
1 15
1 19
1 20
1 21
1 22
1 29
1 7
1 11
1 13
1 19
1 21
1 29
1 7
1 21
1 29
1 7
1 29
1 29
1 29
2 9
1 3
1 5
1 9
1 13
1 15
1 21
1 22
1 30
1 3
1 9
1 13
1...

result:

ok AC

Test #32:

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

input:

79
###########.#####.#.###################################################.######.
#####.#########.##.###.##.#.######.############.####.##.###########.##..#######
#########.##..########.###.###.##########..################.#########.####.###.
#####.####..##.#####.#.###.######.######################....

output:

Yes
7006
1 3
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 14
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 25
1 26
1 27
1 29
1 30
1 31
1 32
1 34
1 37
1 42
1 43
1 44
1 45
1 46
1 49
1 53
1 54
1 55
1 56
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 73
1 74
1 75
1 76
1 78
1 79
1 6
1 7
1 8
1 11
1 12
1 17...

result:

ok AC

Test #33:

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

input:

79
..........##...............#..#.#...#...#.....##...............................
..#...#......#.........#..##...#.#....##.##.........##.#...#...#......#..##....
.##....#.........#........#...............#....#......#.......#....#..#....#...
...#...##...##...#...#.#.....................#.#............

output:

Yes
7257
1 1
1 3
1 5
1 6
1 9
1 12
1 13
1 15
1 16
1 19
1 20
1 21
1 22
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 38
1 39
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 66
1 68
1 69
1 71
1 72
1 74
1 76
1 79
1 1
1 3
1 5
1 6
1 12
...

result:

ok AC

Test #34:

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

input:

79
.......#..##.#.........#....#....#..#..#.........#.#...........#...............
..#.................#............#...........................#........#.#....#.
#........................#........#........#..................#..##...........#
....#...##.................#......##........................

output:

Yes
6829
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 27
1 28
1 29
1 31
1 32
1 33
1 34
1 35
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 45
1 46
1 47
1 48
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 62
1 63
1 64
1 65
1 67
...

result:

ok AC

Test #35:

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

input:

79
....................#..........................................................
.............#..#..#.........#............#...............................#....
.......................................................#.......................
.........................#....#......................#.#....

output:

Yes
6477
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
2 14
2 15
2 16
2 17
2 18
2 19
2 20
2 21
2 22
2 23
2 24
2 25
2 26
2 28
2 29
2 30
2 31
2 32
2 33
2 34
2 35
2 36
2 37
2 38
2 39
2 40
2 41
2 42
2 43
2 44
2 46
2 47
2 48
2 49
2 50
2 51
2 52
2 53
2 54
2 55
2 56
2 57
2 58
2 59
2 60
2 61
2 62
2 63
...

result:

ok AC

Test #36:

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

input:

79
...#####...######.#####.###...####.#.##.#.#....#..##..########.##.##.#.####..##
.##..##.####.#####.##.#######.####..#####..#..#.#####.#...####.#######.#..###.#
#..####.#.#####.###.####..##..##.#.#####..#.###..#..#....#.####..###.##.###.#.#
.##.####.####..######.###..##.#########.#.##.##.#####.......

output:

Yes
7324
1 1
1 3
1 5
1 6
1 7
1 8
1 9
1 10
1 12
1 13
1 15
1 17
1 19
1 23
1 24
1 26
1 27
1 28
1 29
1 30
1 31
1 39
1 41
1 42
1 44
1 50
1 51
1 53
1 54
1 56
1 58
1 59
1 63
1 65
1 66
1 70
1 72
1 75
1 1
1 3
1 6
1 7
1 8
1 9
1 10
1 12
1 15
1 23
1 29
1 30
1 41
1 59
1 66
1 72
1 75
1 1
1 8
1 10
1 12
1 23
1 30
1...

result:

ok AC

Test #37:

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

input:

79
######.#####.##.....#..##.##.##.##.###.#####..#####.#.#######.##.#.###.#.###.#.
...#.....##.....#...#...#.####....#.#.#.######..#..####.#.#######.###..###.###.
.#.#....##.....##.###.#####...#......#.#..#.#..###.#######.#.##...##..###.#..#.
.##.#.#..##.#...###.##....##......#..#....##.##.#.#.#...#...

output:

Yes
8726
1 6
1 7
1 11
1 16
1 17
1 18
1 21
1 22
1 27
1 34
1 39
1 44
1 50
1 51
1 55
1 58
1 61
1 62
1 63
1 65
1 70
1 72
1 73
1 7
1 11
1 16
1 21
1 22
1 27
1 44
1 50
1 55
1 61
1 63
1 70
1 72
1 7
1 11
1 27
1 50
1 55
1 7
1 11
1 27
1 55
1 7
2 30
1 3
1 6
1 8
1 12
1 13
1 14
1 15
1 17
1 19
1 20
1 21
1 25
1 26
...

result:

ok AC

Test #38:

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

input:

79
..#.#..###.##.#.#.####.#.##.#..#....#...#######.#...#...#....#####..##..##.####
#.#..####.#.#.#..#..#.#....##...#.#..#..#.###.#.#.#.#.....####.####.#..#.#.###.
#...#...#.##.#..##.#####.#.#####.......#######...###.#.#...#.###.####.####..##.
#.##.#..#......##...#.##..#..###.##..#..###..#.##.....##....

output:

Yes
8526
1 1
1 3
1 4
1 14
1 16
1 19
1 21
1 22
1 26
1 35
1 36
1 47
1 48
1 50
1 51
1 55
1 57
1 58
1 59
1 62
1 65
1 67
1 72
1 73
1 76
1 1
1 19
1 22
1 35
1 47
1 55
1 57
1 59
1 62
1 65
1 67
1 72
1 1
1 35
1 59
1 62
1 65
1 72
1 59
1 62
1 65
1 72
1 59
1 65
2 25
1 2
1 3
1 5
1 7
1 10
1 14
1 18
1 20
1 22
1 26
...

result:

ok AC

Test #39:

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

input:

79
....#.#.##..#.#...........########..#..#..###########.###..#..####.#.###.#.....
.#..#...#...#.#####.#..##.#.#.#.#...#.##.##.#..##..##########....##.###.####.##
..###..#..###.....#..##..#.....##..##.###....##..####..##..##..#####.#####....#
#.#######..###..###.##.#.#..###########.##..#....#.#.#..#...

output:

Yes
9361
1 4
1 9
1 15
1 19
1 23
1 27
1 29
1 31
1 39
1 41
1 43
1 44
1 47
1 52
1 54
1 67
1 72
1 77
1 79
1 4
1 15
1 19
1 52
1 67
1 72
1 77
1 4
1 15
1 72
1 77
1 72
1 77
1 77
2 25
1 1
1 2
1 3
1 4
1 6
1 7
1 8
1 9
1 10
1 14
1 19
1 20
1 22
1 23
1 24
1 26
1 28
1 29
1 30
1 31
1 33
1 35
1 36
1 37
1 38
1 39
1 4...

result:

ok AC

Test #40:

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

input:

79
###..#.#.#...##.##.###...#.####.####...#....#..#...###...#.#..#...#.#.#.##..#..
#####.###....#.#....#.####...#..###..#..#.##.##...#.###..#.#...####.####....#..
##.....#####.#..#.....#.#.#..#.#..#.############..#.#.#...#....#.###.#...##.##.
#.#...#.########..##....#####...##...#.#.#.#..#.#...##......

output:

Yes
9013
1 2
1 4
1 7
1 9
1 10
1 13
1 15
1 19
1 20
1 21
1 31
1 32
1 39
1 46
1 47
1 51
1 56
1 59
1 64
1 73
1 77
1 79
1 2
1 4
1 9
1 10
1 13
1 19
1 21
1 31
1 46
1 47
1 51
1 56
1 59
1 77
1 21
1 31
1 46
1 47
1 59
1 77
1 46
1 47
1 77
1 46
1 77
1 77
2 39
1 1
1 3
1 4
1 5
1 9
1 12
1 13
1 14
1 17
1 18
1 19
1 2...

result:

ok AC

Test #41:

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

input:

79
.....###.##.#.#....####.#.###..#.###..#.##...###.##..#.##.#.####......#.###.#..
###.##..###.######.#.##..####.#####.#.#.####..#.##..######..#...#.##....###...#
#...##.####.#..#####..#####.##.#...####.#...####..##.##.#..####....#...#....###
####..###..#.##.......#...#..##.####.##.###...#####.#..#....

output:

Yes
9071
1 1
1 2
1 6
1 8
1 13
1 14
1 15
1 16
1 17
1 18
1 21
1 25
1 28
1 30
1 36
1 40
1 43
1 48
1 52
1 53
1 60
1 65
1 66
1 67
1 68
1 69
1 70
1 73
1 75
1 78
1 1
1 14
1 15
1 16
1 17
1 21
1 28
1 36
1 40
1 65
1 67
1 68
1 75
1 1
1 14
1 15
1 17
1 28
1 36
1 65
1 1
1 17
1 65
1 65
1 65
1 65
2 61
1 2
1 3
1 5
1...

result:

ok AC

Test #42:

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

input:

79
..##.##.#..#.#.#.#..##.#.....#.#####...####.####..###..##..#....##.#.#...#....#
.###.#.####.###.###..#.#.#.#...#.#####...##..#.##..##..#.####..###.#.##.#.#.###
.##..###..##....#.#..#.#.##.#.##.###..#####.#..#.#.##.####...##....#.###..###..
#..##..###.#.###.###.##.######.#.#........##...##.##..#.#...

output:

Yes
9058
1 2
1 8
1 9
1 12
1 13
1 14
1 20
1 21
1 22
1 29
1 30
1 36
1 38
1 41
1 45
1 52
1 55
1 57
1 60
1 63
1 64
1 65
1 68
1 72
1 73
1 77
1 9
1 13
1 14
1 20
1 21
1 29
1 30
1 36
1 38
1 41
1 45
1 55
1 63
1 64
1 72
1 9
1 14
1 29
1 41
1 45
1 63
1 72
1 29
1 63
1 72
1 72
2 16
1 1
1 3
1 4
1 7
1 8
1 10
1 11
1...

result:

ok AC

Test #43:

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

input:

79
...##...#..##......##..##....###....#.##..##.##.##..#.#..#.#..##...#........#..
####.#.#.#.#.###....#..#.##.....#.#.###.#.#.#.#...#.#####..##..###.##.#.#######
..#.#.#...#####.#####.#.##..#.#.#..###.##...##.#.#..#...#####.###..##...##..###
.#....#...#..##......#..##....#..##.#..#.##.###..##...#.#...

output:

Yes
8775
1 6
1 7
1 14
1 15
1 22
1 23
1 24
1 28
1 32
1 36
1 42
1 43
1 47
1 48
1 50
1 52
1 54
1 56
1 59
1 62
1 65
1 67
1 68
1 70
1 72
1 77
1 79
1 7
1 24
1 36
1 42
1 48
1 50
1 52
1 54
1 56
1 59
1 62
1 65
1 67
1 70
1 79
1 7
1 42
1 48
1 50
1 52
1 54
1 56
1 59
1 62
1 67
1 42
1 50
1 56
1 62
1 67
1 56
1 62
...

result:

ok AC

Test #44:

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

input:

79
#....#.##.###.....##.#####.#.#..##..#.######.#.###.#.######.#.##.#......#..#.##
.###.##.##......#..###.#.#....#....##.###.#.###.#......#...##..##..##...#.##...
.##.#..##...##...#.#....#...#...##..#.#.#.#...#.#.##...#.###..##.#####..#.#####
..###..#.###......#..#...###..#......###..##.....####..##...

output:

Yes
8719
1 1
1 2
1 3
1 10
1 12
1 18
1 20
1 21
1 23
1 25
1 29
1 30
1 32
1 35
1 37
1 41
1 42
1 48
1 49
1 58
1 60
1 61
1 65
1 72
1 74
1 12
1 20
1 25
1 30
1 37
1 41
1 42
1 48
1 49
1 65
1 74
1 25
1 30
1 37
2 73
1 4
1 6
1 8
1 9
1 12
1 16
1 19
1 21
1 22
1 23
1 24
1 25
1 27
1 29
1 31
1 32
1 33
1 34
1 36
1 3...

result:

ok AC

Test #45:

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

input:

79
...#..####..##.#.#..#.....#..#.####...#.#..#.#....#..#..#.###.#####...#....#.##
..##......##.#.##..#.#.###..####.#.##.#.......##..##.....#.#.#####....#..###.#.
#..#.##.#.#.##..##.####..########.##.#.#..####.#####.##.######.##.#..####..##.#
##...#....##....####.#.#.#..#...##########.###.###.#..###...

output:

Yes
9474
1 1
1 8
1 14
1 17
1 25
1 30
1 33
1 35
1 39
1 40
1 44
1 45
1 53
1 54
1 55
1 57
1 60
1 68
1 70
1 72
1 76
1 77
1 8
1 25
1 30
1 33
1 39
1 40
1 44
1 68
1 76
1 30
1 44
1 68
1 76
1 30
1 44
1 76
1 44
1 76
1 76
2 36
1 7
1 9
1 13
1 14
1 15
1 17
1 18
1 19
1 21
1 27
1 28
1 29
1 30
1 34
1 37
1 44
1 46
1...

result:

ok AC

Test #46:

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

input:

79
#...##..#.##..#.#.###..##.###.#####..#.#...###......#..#...#..######.#.#..#.#.#
#..#.##...#.###.#..#...#####.#.#.#...##..##.###..###..####..#.#.#..####.##.#..#
###..#.##..##.###..###.#.##..#..##....##.#..####.##.##..###..#..#.....#..#.##..
.#.#.....##...#.##..###.##.##.##..#..###.##...#.#.#####.#...

output:

Yes
9093
1 2
1 5
1 10
1 12
1 14
1 19
1 20
1 21
1 23
1 32
1 36
1 37
1 38
1 42
1 45
1 49
1 50
1 53
1 54
1 55
1 59
1 63
1 64
1 66
1 68
1 73
1 79
1 5
1 10
1 21
1 36
1 38
1 45
1 50
1 59
1 63
1 64
1 66
1 73
1 79
1 5
1 36
1 38
1 50
1 59
1 63
1 66
1 79
1 36
1 38
1 50
1 59
1 38
1 38
2 8
1 1
1 2
1 4
1 5
1 7
1...

result:

ok AC

Test #47:

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

input:

80
##..#..#.#.##.######.####.##...#..#####.#..#.#####.##...#.####.##.##.#.#...#.#..
#.###.#.#.#...#.#...#.#.#.###....#.##.###..#....##.####.##.#####.####.##.##..#..
.###.##.###.##.####..#####..#####.###.#####.##....##.#.#.#..#####.#...###.#.##.#
#.###.###..##.#.##.##...###.#.####...##.###.#...##.#.#...

output:

Yes
8060
1 1
1 2
1 4
1 5
1 8
1 9
1 10
1 11
1 20
1 25
1 27
1 28
1 32
1 33
1 35
1 36
1 38
1 39
1 40
1 42
1 43
1 47
1 48
1 50
1 51
1 56
1 58
1 59
1 61
1 62
1 66
1 68
1 72
1 79
1 80
1 4
1 8
1 9
1 11
1 25
1 28
1 32
1 36
1 42
1 51
1 59
1 66
1 79
1 4
1 9
1 25
1 28
1 36
1 42
1 51
1 66
1 4
1 25
1 28
1 36
1 5...

result:

ok AC

Test #48:

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

input:

80
.....#.##...#.#.###.......#..#.#...#..###.#.#..#..#.#...###......####..#.#.#..##
##..##...#.....##.#....###.#..#......###.#...#.##.....#.#.##..##...#....#.......
#.#.#..#.#.##..........#..............##..#.#..###.##..#.###...#......#.#...##..
....#...##.##.#.#.......#...#.#.##.#...#.###..#.#...##...

output:

Yes
7522
1 2
1 5
1 7
1 10
1 11
1 14
1 17
1 18
1 21
1 22
1 23
1 26
1 28
1 30
1 31
1 32
1 34
1 36
1 37
1 45
1 47
1 48
1 50
1 54
1 56
1 58
1 59
1 60
1 61
1 62
1 63
1 65
1 67
1 68
1 70
1 76
1 77
1 78
1 17
1 18
1 22
1 30
1 36
1 37
1 45
1 50
1 54
1 58
1 59
1 60
1 61
1 67
1 68
1 77
1 17
1 22
1 36
1 45
1 54...

result:

ok AC

Test #49:

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

input:

80
###..####..############.########.########.###.########.#####.###.##.######..####
.#####.#.#####.###.######.###..##.################.###.#.#######################
########.#####.######..##.##.####.#.#####.#.#.###..#########...######.##.#######
##.############.#..#.##..########.####..####..#.######...

output:

Yes
7286
1 2
1 3
1 6
1 7
1 8
1 9
1 10
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 33
1 34
1 36
1 37
1 38
1 40
1 43
1 45
1 46
1 49
1 50
1 51
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 66
1 69
1 71
1 72
1 74
1 75
1 77
1 78
1 79
1 80
1 ...

result:

ok AC

Test #50:

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

input:

80
#.###.##..#..##############.#.###..#######.#####.####.###.######...######.######
#.##...#.####.#.###..#.#####.####.#.#.######.#####.#...###.##..##.#.####.##..###
#####################.#..#####.######.###.####.##############.####.###.##.##.#.#
##.##.#.###.##..#####.###########.##.#.#.#.##..#.###.#...

output:

Yes
7660
1 1
1 3
1 5
1 6
1 11
1 12
1 15
1 17
1 18
1 19
1 20
1 21
1 22
1 26
1 27
1 29
1 30
1 31
1 32
1 33
1 37
1 38
1 39
1 41
1 42
1 44
1 45
1 46
1 49
1 51
1 53
1 57
1 59
1 61
1 63
1 65
1 68
1 69
1 70
1 71
1 72
1 73
1 77
1 78
1 3
1 5
1 6
1 12
1 15
1 17
1 18
1 19
1 20
1 21
1 22
1 27
1 30
1 31
1 39
1 4...

result:

ok AC

Test #51:

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

input:

80
#####..##.###..###..##.#......#..####.##.####.#####.##.####.###.###..#..#.####..
####...######.#####.##.######..#####..####..#######.#..###########.#..##..#.####
.#..#..##..##..#..#.#.#####..##.#######.##.###..####.###.###..#.#.###.#######.##
.#.###.########..###.#.#.#####.###..##...####..#..###....

output:

Yes
7557
1 4
1 5
1 6
1 7
1 11
1 15
1 16
1 17
1 18
1 19
1 21
1 24
1 28
1 33
1 35
1 38
1 43
1 46
1 48
1 49
1 51
1 52
1 53
1 55
1 56
1 57
1 58
1 63
1 66
1 67
1 69
1 71
1 72
1 76
1 77
1 78
1 79
1 6
1 7
1 11
1 15
1 16
1 17
1 18
1 19
1 28
1 33
1 35
1 38
1 46
1 51
1 52
1 53
1 56
1 58
1 63
1 66
1 69
1 71
1 ...

result:

ok AC

Test #52:

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

input:

80
##.#..#####...####.#.....#.#.#....##...#.....##...##....#..##....###.....#.##.#.
##.#...#..##.#####...#..#.......#..#..#.###.###########.###.#.##.##.##.########.
...##.##.#..###...###.#.###.#.##.#####..#.....##.####..##.#.####.#######.###.###
....#.##..#.##...##..##.##....#.#...###.#.##..##.##......

output:

Yes
8538
1 3
1 6
1 7
1 10
1 13
1 19
1 20
1 21
1 23
1 26
1 40
1 57
1 60
1 65
1 68
1 69
1 74
1 75
1 79
1 7
1 19
1 20
1 40
1 57
1 74
1 75
1 7
1 20
1 40
1 74
1 7
1 40
2 73
1 2
1 4
1 6
1 7
1 8
1 12
1 13
1 14
1 20
1 22
1 23
1 24
1 25
1 28
1 30
1 31
1 32
1 33
1 36
1 37
1 38
1 40
1 43
1 46
1 48
1 49
1 53
1 ...

result:

ok AC

Test #53:

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

input:

80
.#..#.####..##.#..##...#.#..#.#.#...#.#####.#..##....#.####.#.####.##.#.#...#..#
.#.#...#....#.##.###..#.###..#.#.#.#...####.#..#..##...####..##..##..#.##.#..###
...##.#..###...#....#..###..#.#..##.#.#..#.##.####....###..#.######....#.#..####
...##..##...#.#...##...##.#.####.#...###..#...#####.##...

output:

Yes
8770
1 9
1 12
1 13
1 17
1 21
1 29
1 30
1 31
1 32
1 39
1 40
1 43
1 46
1 60
1 62
1 66
1 68
1 70
1 74
1 78
1 80
1 9
1 17
1 21
1 31
1 32
1 39
1 46
1 60
1 62
1 66
1 9
1 17
1 21
1 31
1 32
1 39
1 46
1 60
1 9
1 17
1 21
1 31
1 32
1 39
1 60
1 9
1 21
1 32
1 60
1 9
1 21
1 32
1 9
1 21
1 9
2 49
1 1
1 2
1 3
1 ...

result:

ok AC

Test #54:

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

input:

80
####...####.#.#..####.....###...#.#.#......#..##.###.###.#.#.#...#..###.#...#..#
#...#.#..#.###.#.#.####..###..#.#...#.##.#...##.#..##..#..##.#.####.#..##..##.#.
#.########.###...#..##..##..######..#.#.#.###..##..#.#.#.###.#.###...#.####..###
#.##.#.####..####.#..##.###.##.##......#..##....###.##...

output:

Yes
9148
1 1
1 2
1 3
1 9
1 12
1 13
1 16
1 17
1 25
1 28
1 29
1 30
1 35
1 36
1 37
1 39
1 41
1 42
1 51
1 52
1 54
1 55
1 56
1 62
1 66
1 67
1 68
1 70
1 74
1 78
1 2
1 13
1 17
1 29
1 30
1 35
1 36
1 37
1 41
1 54
1 55
1 56
1 66
1 68
1 74
1 2
1 17
1 36
1 37
1 54
1 55
1 74
1 2
1 54
1 74
2 18
1 2
1 3
1 7
1 9
1 ...

result:

ok AC

Test #55:

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

input:

80
#..#..........###.#...#.######..###...###..####.#..#.####.##.###..##....#..#.##.
###..##.#.#.###......#####...#.##.#.#..#.....###.#...##.#.##.#......#.#..###...#
####.##...#.###..###.####..#.#.###.####..#.##.###.#.#..##.##.##....##...#.#...##
##.#.#..#.###....##..####.#......#####....##.#.##.#.##...

output:

Yes
9800
1 2
1 3
1 7
1 8
1 11
1 15
1 24
1 25
1 28
1 30
1 33
1 35
1 36
1 39
1 40
1 43
1 45
1 46
1 51
1 53
1 54
1 55
1 62
1 64
1 65
1 69
1 70
1 74
1 77
1 80
1 7
1 15
1 24
1 33
1 36
1 45
1 46
1 51
1 53
1 54
1 62
1 65
1 69
1 70
1 74
1 33
1 36
1 45
1 46
1 51
1 54
1 62
1 69
1 70
1 74
1 45
1 46
1 51
1 54
1...

result:

ok AC

Test #56:

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

input:

80
.#..#...#...##...#....##.#.#.###....##.#.#..#.#.#......#####.#.##.#.#...#.###...
#..######.##.####..####..##..#####.##.....#.##...###.##.##.#....#.######....###.
#.#.#.##..##.#..#...##...###.#....#.######.#####....#.#..#.####..#....##..#...##
#.#####.##.#.....#.##.###.#####.#########.####.##....#...

output:

Yes
8929
1 3
1 4
1 7
1 11
1 12
1 15
1 18
1 20
1 26
1 28
1 29
1 30
1 32
1 38
1 47
1 55
1 61
1 62
1 71
1 73
1 74
1 3
1 4
1 11
1 12
1 38
1 55
1 71
1 74
1 4
1 11
1 38
1 71
1 4
1 71
2 3
1 3
1 7
1 12
1 15
1 16
1 17
1 21
1 23
1 24
1 25
1 31
1 32
1 33
1 34
1 35
1 37
1 43
1 44
1 46
1 47
1 48
1 49
1 50
1 51
1...

result:

ok AC

Test #57:

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

input:

80
#.#.#....#.#.#......##.##..#.##...##.##..#######..#####..##.#....####.##.##.##..
...####...#.###...#.#........#.##....#...##..##...#.#########..#.#...##....#.#..
..#..#.###..#.#..###.##.###..##..####.#..##.#.##..#...#...##.....###.#....###.#.
##.######..#...###.##.####.#.#..##.#.##....#..#..#...#...

output:

Yes
9373
1 2
1 4
1 7
1 11
1 12
1 14
1 15
1 17
1 18
1 20
1 22
1 23
1 25
1 26
1 33
1 35
1 39
1 40
1 44
1 47
1 51
1 56
1 57
1 58
1 64
1 65
1 66
1 68
1 69
1 72
1 11
1 14
1 15
1 18
1 22
1 23
1 26
1 40
1 44
1 51
1 56
1 65
1 66
1 69
1 72
1 44
1 56
1 69
1 72
1 44
1 69
1 44
1 69
1 69
1 69
2 76
1 3
1 4
1 5
1 ...

result:

ok AC

Test #58:

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

input:

80
...###.#.#..#....##.##....#.####.####..########.##..#####.##.#..##..##.#...#.#.#
#.#.....#.##...#.##..#..#...#..###.###.########.##....#..##..#.#.#.#.##.........
#..##...#.##.#.#.##...##.......###...##..#...##..####.####.##.##..#.##....#####.
#.##..##..#.#.#..#..##.#...##.##.#.....#....#.#.##..#....

output:

Yes
9190
1 3
1 13
1 17
1 21
1 24
1 26
1 27
1 28
1 30
1 31
1 33
1 36
1 37
1 38
1 42
1 45
1 46
1 51
1 54
1 61
1 62
1 66
1 67
1 69
1 72
1 74
1 79
1 3
1 13
1 17
1 27
1 28
1 33
1 36
1 38
1 42
1 45
1 46
1 51
1 54
1 61
1 72
1 74
1 13
1 28
1 33
1 36
1 45
1 46
1 51
1 54
1 13
1 51
1 54
1 51
1 54
1 51
1 51
1 5...

result:

ok AC

Test #59:

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

input:

80
###..#.#..#.#.#.#.##.####..##.##......###.##..##.#.#....####....###.#....###.#.#
#######.#.##...##.....####.##...###..#.#..###..###.#..###.#.......#....#.#.#....
###.#.#.##...#...##.....###.##.#...#..###.#...###.##.#.##..#.#..#.#....######..#
#.#..##.#.######.#...##.#..#...#.#..#..#...#..##.#...#...

output:

Yes
9239
1 2
1 5
1 6
1 10
1 11
1 14
1 15
1 16
1 19
1 20
1 27
1 32
1 34
1 35
1 43
1 45
1 48
1 49
1 50
1 52
1 53
1 54
1 59
1 62
1 64
1 65
1 72
1 73
1 75
1 2
1 14
1 15
1 16
1 19
1 27
1 32
1 34
1 43
1 48
1 49
1 50
1 54
1 64
1 72
1 14
1 19
1 43
1 49
1 64
1 14
2 59
1 1
1 3
1 7
1 8
1 9
1 10
1 14
1 19
1 22
...

result:

ok AC

Test #60:

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

input:

80
##.##..##....#..#.#...#####....#.####....#.....#..####...#.##.#..#..#######..##.
.######.####..#.#####.##.....#.####....#.###.....##.#.#.#....#.##.#.#.###.##....
###.#..#.##.#.##.##.#.#.##.....##..#...#...#.#.##.#####.#....#..#..#.###.#.#.#.#
#..#..##..#.##..#..#.###.#.###..#...####.##....####......

output:

Yes
9514
1 1
1 5
1 7
1 12
1 14
1 15
1 16
1 17
1 23
1 28
1 35
1 38
1 42
1 45
1 58
1 63
1 68
1 73
1 74
1 75
1 79
1 80
1 1
1 5
1 7
1 15
1 35
1 38
1 45
1 58
1 68
1 74
1 75
1 79
1 5
1 35
1 38
1 75
1 35
1 38
1 38
2 59
1 1
1 5
1 7
1 9
1 10
1 11
1 13
1 14
1 15
1 16
1 19
1 21
1 25
1 28
1 32
1 33
1 34
1 36
1 ...

result:

ok AC

Test #61:

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

input:

80
.#.##..####..#.#..#.##.##.##..#..#############..###.######.#.#..##.##....##.##.#
....#...##.#.####..#.##..#....#...#.#..##..##.###.######.###..#.#.####.#......#.
....##...###.#.#..#.#....#...#.#####..###.#.##...###.......#.####.####....#..##.
..###.#....##..#.#..#.#.##..###..#.##..##..#.####.#.##...

output:

Yes
8784
1 4
1 6
1 11
1 12
1 15
1 17
1 20
1 21
1 27
1 28
1 30
1 32
1 33
1 35
1 38
1 42
1 43
1 44
1 46
1 50
1 56
1 57
1 59
1 61
1 64
1 65
1 67
1 4
1 21
1 27
1 28
1 30
1 35
1 38
1 42
1 43
1 50
1 57
1 61
1 64
1 67
1 35
1 42
1 43
1 61
1 67
1 35
1 43
1 35
1 43
2 7
1 1
1 4
1 6
1 9
1 10
1 18
1 19
1 21
1 23...

result:

ok AC

Test #62:

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

input:

5
...##
##...
#.#.#
#.#.#
#.#..
###..
..###
.#...
.#.#.
.#.##

output:

Yes
38
1 2
1 5
2 1
1 3
1 5
1 5
1 5
2 1
1 3
1 3
1 3
2 1
1 1
1 4
1 1
1 4
1 1
1 4
1 1
1 4
2 1
2 1
1 2
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
1 2
1 2
1 1
1 1
1 1

result:

ok AC

Test #63:

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

input:

5
###.#
.#...
#..#.
#..##
.#..#
...#.
#.#.#
.##.#
.##..
#.##.

output:

Yes
39
1 2
1 5
1 5
1 5
2 2
1 1
1 2
1 2
2 2
1 1
1 2
1 1
1 1
2 2
2 2
1 3
1 3
1 3
1 3
1 4
2 2
1 4
2 2
1 4
2 2
1 4
1 4
1 5
2 2
2 2
1 4
2 2
1 4
1 4
1 4
1 3
1 3
1 4
1 4

result:

ok AC

Test #64:

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

input:

5
..##.
..#.#
.....
#....
....#
#....
.....
.#...
..#..
.#.##

output:

Yes
26
2 2
2 4
2 4
2 4
2 4
1 2
2 1
2 3
2 5
2 1
2 1
1 2
2 1
2 2
2 3
2 5
2 2
1 2
1 2
2 2
2 5
2 5
1 2
1 2
2 3
2 3

result:

ok AC

Test #65:

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

input:

5
.#...
.....
.#.##
.....
.....
.....
.....
..##.
...#.
#....

output:

Yes
33
2 3
2 4
2 5
2 3
2 5
2 5
1 1
2 1
2 2
2 3
2 5
2 1
2 2
2 3
2 1
2 2
2 1
1 1
2 2
1 1
2 4
2 4
1 1
2 4
2 4
2 4
2 4
1 1
1 1
1 1
1 1
2 4
2 4

result:

ok AC

Test #66:

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

input:

5
...##
##.#.
.....
#.#.#
#.##.
...#.
.#..#
###.#
#..##
.#...

output:

Yes
40
1 1
1 1
1 1
1 1
2 4
1 3
1 5
1 5
1 5
2 4
1 3
1 5
2 4
1 3
2 4
1 2
1 3
1 4
2 4
1 4
1 4
2 4
1 4
2 4
1 4
1 2
2 4
2 4
1 4
2 4
1 2
1 4
1 2
2 4
1 4
1 4
1 1
1 4
1 4
1 4

result:

ok AC

Test #67:

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

input:

5
#.#..
###.#
.##.#
.#...
..#..
#...#
##..#
....#
#..##
.##..

output:

Yes
39
1 1
1 2
1 3
1 2
1 2
1 2
2 4
1 1
1 4
2 4
1 4
1 4
1 4
2 4
1 3
2 4
1 3
1 5
1 5
1 5
1 5
2 4
2 4
1 1
1 1
1 3
2 4
1 3
1 3
1 3
1 3
2 4
2 4
2 4
2 4
1 3
1 4
1 4
1 4

result:

ok AC

Test #68:

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

input:

6
##....
##.#.#
.###..
#..#.#
.###..
##..#.
..####
..#.#.
#...##
.##.#.
#...##
..##.#

output:

Yes
42
1 3
1 5
2 2
1 3
1 6
1 6
1 6
1 6
2 2
1 1
1 3
1 1
1 3
2 2
1 2
1 4
1 4
2 2
1 2
1 5
1 2
1 2
1 2
2 2
1 3
1 5
1 5
2 2
1 6
2 2
1 4
1 4
1 4
2 2
1 1
1 5
2 2
1 1
2 2
1 1
1 4
1 4

result:

ok AC

Test #69:

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

input:

6
.##.##
##....
..#...
.##.#.
.##..#
###.##
#..#..
..####
##.###
#..#.#
#..##.
...#..

output:

Yes
51
1 1
1 3
1 4
1 5
1 6
1 3
2 4
1 2
1 4
1 2
1 4
2 4
1 3
1 5
1 5
1 5
1 5
2 4
1 3
1 6
2 4
1 3
1 6
2 4
1 6
2 4
1 4
1 6
1 4
2 4
2 4
1 1
1 1
1 1
1 2
1 2
2 4
1 2
2 4
1 2
1 2
1 2
2 4
2 4
2 4
1 1
2 4
2 4
1 2
1 2
1 2

result:

ok AC

Test #70:

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

input:

6
......
......
......
......
......
......
......
......
......
......
......
......

output:

Yes
30
2 1
2 2
2 3
2 4
2 5
2 6
2 1
2 2
2 3
2 4
2 5
2 6
2 1
2 2
2 3
2 4
2 5
2 6
2 1
2 2
2 3
2 4
2 5
2 6
2 1
2 2
2 3
2 4
2 5
2 6

result:

ok AC

Test #71:

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

input:

6
###..#
##....
..#..#
#.#.##
.#.#.#
.#.###
##.#..
##..#.
.##.#.
.##...
#.###.
#.###.

output:

Yes
49
1 3
1 5
1 6
1 3
1 6
1 6
1 6
1 6
2 6
1 1
1 2
1 4
1 5
1 2
1 5
1 2
1 5
1 5
2 6
1 4
2 6
2 6
1 1
1 1
1 1
1 1
2 6
1 2
1 2
2 6
1 3
1 3
1 3
1 4
2 6
1 4
1 4
2 6
1 4
1 4
1 4
2 6
2 6
2 6
2 6
1 4
2 6
1 4
1 4

result:

ok AC

Test #72:

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

input:

6
.#..#.
#.####
...###
##....
#.####
#.#...
.##.#.
.###.#
#.##.#
#.#...
###..#
.##...

output:

Yes
46
1 2
1 3
1 4
1 5
1 6
1 2
1 4
1 6
1 2
2 3
1 1
1 2
1 3
1 4
1 5
1 6
1 2
1 4
1 5
1 6
1 4
1 6
2 3
1 1
1 3
1 5
1 1
2 3
1 1
1 5
2 3
1 3
1 3
1 1
2 3
1 1
1 1
1 1
1 1
1 1
2 3
2 3
2 3
2 3
2 3
1 1

result:

ok AC

Test #73:

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

input:

6
.#####
.##..#
##.##.
......
##..##
....#.
...#..
####..
.###..
###.#.
..##.#
....##

output:

Yes
56
1 1
1 5
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 1
1 2
1 3
1 5
1 3
1 3
2 1
1 1
1 2
2 1
1 1
1 2
2 1
1 3
2 1
1 2
1 4
2 1
1 4
1 4
2 1
1 4
1 5
1 5
2 1
1 5
1 5
1 5
1 5
1 6
2 1
1 6
1 6
1 6
2 1
2 1
2 1
2 1
1 5
1 5
1 2
1 2
1 2
1 2
1 4
1 4
1 4

result:

ok AC

Extra Test:

score: 0
Extra Test Passed