The Quiet Pattern🌙

For several nights, Mustafa noticed something unusual.

The illuminated old man was never in the same place twice. Some nights he stood near the pillars, other nights close to the back rows. A few worshippers claimed they had seen him near the doors, while others were certain he had passed quietly between the rows.

At first, the committee tried to mark his exact position each night. That failed. The notes were messy. People arrived late, left early, and sometimes wrote down what they thought they saw.

Then Mustafa realised something important:

The man’s light was not defined by a single moment, but by consistency over time.

The question was no longer where he stood, but where he appeared most reliably.

🧩 The Puzzle

Each line in the input file records a single sighting of the illuminated man.

A sighting consists of:

<night_id> <row> <column>

Your task is to determine the Quiet Position.

Definition: Quiet Position

A position is considered quiet if:
1. It appears in at least 10 different nights
2. Its average sightings per night is greater than or equal to 3
3. Among all such positions, it has the lowest row number
- If tied, choose the lowest column number

Example Input

1 3 4
1 3 4
1 3 4
2 3 4
2 3 4
2 3 4
3 3 4
3 3 4
3 3 4
3 3 4
4 5 2
4 5 2
5 5 2

Explanation

Consider each (row, column) separately.

Position (3, 4)

  • Appears on nights: {1, 2, 3}
  • Total sightings: 10
  • Average per night: 10 / 3 ≈ 3.33

Position (5, 2)

  • Appears on nights: {4, 5}
  • Total sightings: 3
  • Average per night: 1.5

Only (3, 4) meets the consistency requirement.
Therefore, the quiet position is row 3, column 4

Task

Mustafa collects all the sightings into a file which accumalates to thousands of lines! Work out which row & column is the quiet position based on all the sightings.
The format of your answer should be 00, 00.