On the Subject of Pie

√-1 23 Σ π and it was delicious!

The module shows a 5 length substring of π.

X = (Location of first digit + Shown number) % 100.
Y = (Sum of digits) % 10.

Follow all the rules below from top to bottom, pressing the i-th digit if its rule is true.

  1. X is prime.
  2. X % 2 = Y % 2.
  3. X % 3 = 0.
  4. Y ≠ 0 and X % Y = 0.

Then the remaining from right to left.

The table has 20 columns, calculate the location as column + 20*row