#!/bin/sh set -eu PROOF=${PROOF:-/app/proof.md} mkdir -p "$(dirname -- "$PROOF")" cat > "$PROOF" <<'IMO_PROOF_af2fd0d09f68624f93418fe94d0bf01f7fdbc2070eec81ef18c5ab3389c2a52e' Let $Q$ be the antipode of $B$ in the circumcircle of $ABC$. \textbf{Claim.} $AHQC$ is a parallelogram, and $APCQ$ is an isosceles trapezoid. \emph{Proof.} The claim follows from $\overline{AH}\perp\overline{BC}\perp\overline{CQ}$ and $\overline{CF}\perp\overline{AB}\perp\overline{AQ}$. Let $M$ be the midpoint of $\overline{QC}$. \textbf{Claim.} Point $M$ is the circumcenter of $\triangle AFP$. \emph{Proof.} It's clear that $MA=MP$ from the isosceles trapezoid $APCQ$. As for $MA=MF$, let $N$ denote the midpoint of $\overline{AF}$; then $\overline{MN}$ is a midline of the parallelogram, so $\overline{MN}\perp\overline{AF}$. Since $\overline{CM}\perp\overline{BC}$ and $M$ is the center of $(AFP)$, it follows $CX=CY$. IMO_PROOF_af2fd0d09f68624f93418fe94d0bf01f7fdbc2070eec81ef18c5ab3389c2a52e