Raw ← &fras"06.in"
Count ← +1-⊃(⌊+1⊢)(⌈+¯1⊢⇌)
Solve ← ÷2[⊃(-:)+⊃⊢(√-:⊃(×.⊢)(×4⊢⇌))]
One ← /×Count⍉≡Solve⍉⊜(⊐⋕↘1⊜□≠@ .)≠@\n.
Two ← Count Solve⊜(⋕▽≠@ .↘⊗@ .)≠@\n.
⊃One Two Raw