Here is a relatively simple two dimensional array challenge.
Imagine a battlefield of 625 foot soldiers. You command the odd troops, but unfortunately the strength of the even troops overwhelms you. Thankfully, your soldiers have a secret power: If the power of each odd troop and the fellow odd allies surrounding them is divisible by a secret power number, they unleash their ultimate attack and win! You must honor each victorious soldier.
Rules
Given a 25 x 25 integer array where each element contains the product of its x and y position plus 1, return the coordinates of every "victorious" odd element that meets the following criteria:
The sum of the element's value and its adjacent odd elements (up, down, left, and right) is divisible by the input (secret power number). It must have elements adjacent to it on all four sides and not be on an edge.
Submissions can be either a function or full program that requires a single input. The output can be in any order.
Our 25 x 25 array, the battlefield, looks like this:
1, 1, 1, 1,...
1, 2, 3, 4,...
1, 3, 5, 7,...
1, 4, 7, 10,...
etc.
Example
Here is a 3 x 3 example:
43, 57, 71
46, 61, 76
49, 65, 81
To determine if an element (61, in the center) wins, we sum the values of it and the adjacent odd elements.
61 + 57 + 65 = 183
If the total is divisible by the input, the element's x and y position is printed. If our input is 3, because 183 is divisible by 3, "1, 1" is printed.
Output
If the input (secret power number) is 37, the elements returned (victorious soldiers to be commended) must be:
2, 18
3, 12
4, 9
5, 22
6, 6
8, 23
9, 4
10, 11
11, 10
12, 3
18, 2
22, 5
23, 8
If the input is 191, the elements returned must be:
10, 19
19, 10
An input of 3:
1, 2
1, 4
1, 6
1, 8
1, 10
1, 12
1, 14
1, 16
1, 18
1, 20
1, 22
2, 1
2, 3
2, 4
2, 5
2, 7
2, 9
2, 10
2, 11
2, 13
2, 15
2, 16
2, 17
2, 19
2, 21
2, 22
2, 23
3, 2
3, 4
3, 6
3, 8
3, 10
3, 12
3, 14
3, 16
3, 18
3, 20
3, 22
4, 1
4, 2
4, 3
4, 5
4, 7
4, 8
4, 9
4, 11
4, 13
4, 14
4, 15
4, 17
4, 19
4, 20
4, 21
4, 23
5, 2
5, 4
5, 6
5, 8
5, 10
5, 12
5, 14
5, 16
5, 18
5, 20
5, 22
6, 1
6, 3
6, 5
6, 7
6, 9
6, 11
6, 13
6, 15
6, 17
6, 19
6, 21
6, 23
7, 2
7, 4
7, 6
7, 8
7, 10
7, 12
7, 14
7, 16
7, 18
7, 20
7, 22
8, 1
8, 3
8, 4
8, 5
8, 7
8, 9
8, 10
8, 11
8, 13
8, 15
8, 16
8, 17
8, 19
8, 21
8, 22
8, 23
9, 2
9, 4
9, 6
9, 8
9, 10
9, 12
9, 14
9, 16
9, 18
9, 20
9, 22
10, 1
10, 2
10, 3
10, 5
10, 7
10, 8
10, 9
10, 11
10, 13
10, 14
10, 15
10, 17
10, 19
10, 20
10, 21
10, 23
11, 2
11, 4
11, 6
11, 8
11, 10
11, 12
11, 14
11, 16
11, 18
11, 20
11, 22
12, 1
12, 3
12, 5
12, 7
12, 9
12, 11
12, 13
12, 15
12, 17
12, 19
12, 21
12, 23
13, 2
13, 4
13, 6
13, 8
13, 10
13, 12
13, 14
13, 16
13, 18
13, 20
13, 22
14, 1
14, 3
14, 4
14, 5
14, 7
14, 9
14, 10
14, 11
14, 13
14, 15
14, 16
14, 17
14, 19
14, 21
14, 22
14, 23
15, 2
15, 4
15, 6
15, 8
15, 10
15, 12
15, 14
15, 16
15, 18
15, 20
15, 22
16, 1
16, 2
16, 3
16, 5
16, 7
16, 8
16, 9
16, 11
16, 13
16, 14
16, 15
16, 17
16, 19
16, 20
16, 21
16, 23
17, 2
17, 4
17, 6
17, 8
17, 10
17, 12
17, 14
17, 16
17, 18
17, 20
17, 22
18, 1
18, 3
18, 5
18, 7
18, 9
18, 11
18, 13
18, 15
18, 17
18, 19
18, 21
18, 23
19, 2
19, 4
19, 6
19, 8
19, 10
19, 12
19, 14
19, 16
19, 18
19, 20
19, 22
20, 1
20, 3
20, 4
20, 5
20, 7
20, 9
20, 10
20, 11
20, 13
20, 15
20, 16
20, 17
20, 19
20, 21
20, 22
20, 23
21, 2
21, 4
21, 6
21, 8
21, 10
21, 12
21, 14
21, 16
21, 18
21, 20
21, 22
22, 1
22, 2
22, 3
22, 5
22, 7
22, 8
22, 9
22, 11
22, 13
22, 14
22, 15
22, 17
22, 19
22, 20
22, 21
22, 23
23, 2
23, 4
23, 6
23, 8
23, 10
23, 12
23, 14
23, 16
23, 18
23, 20
23, 22
An input of 5:
1, 4
1, 14
2, 2
2, 4
2, 6
2, 7
2, 8
2, 10
2, 12
2, 14
2, 16
2, 17
2, 18
2, 20
2, 22
3, 8
3, 18
4, 1
4, 2
4, 4
4, 6
4, 8
4, 10
4, 11
4, 12
4, 14
4, 16
4, 18
4, 20
4, 21
4, 22
6, 2
6, 4
6, 6
6, 8
6, 9
6, 10
6, 12
6, 14
6, 16
6, 18
6, 19
6, 20
6, 22
7, 2
7, 12
7, 22
8, 2
8, 3
8, 4
8, 6
8, 8
8, 10
8, 12
8, 13
8, 14
8, 16
8, 18
8, 20
8, 22
8, 23
9, 6
9, 16
10, 2
10, 4
10, 6
10, 8
10, 10
10, 12
10, 14
10, 16
10, 18
10, 20
10, 22
11, 4
11, 14
12, 2
12, 4
12, 6
12, 7
12, 8
12, 10
12, 12
12, 14
12, 16
12, 17
12, 18
12, 20
12, 22
13, 8
13, 18
14, 1
14, 2
14, 4
14, 6
14, 8
14, 10
14, 11
14, 12
14, 14
14, 16
14, 18
14, 20
14, 21
14, 22
16, 2
16, 4
16, 6
16, 8
16, 9
16, 10
16, 12
16, 14
16, 16
16, 18
16, 19
16, 20
16, 22
17, 2
17, 12
17, 22
18, 2
18, 3
18, 4
18, 6
18, 8
18, 10
18, 12
18, 13
18, 14
18, 16
18, 18
18, 20
18, 22
18, 23
19, 6
19, 16
20, 2
20, 4
20, 6
20, 8
20, 10
20, 12
20, 14
20, 16
20, 18
20, 20
20, 22
21, 4
21, 14
22, 2
22, 4
22, 6
22, 7
22, 8
22, 10
22, 12
22, 14
22, 16
22, 17
22, 18
22, 20
22, 22
23, 8
23, 18
This is code-golf, the lowest byte-count code without using standard loopholes is the winner.
As this is my first submission, any advice is greatly appreciated. Thanks!