Polyhedron A B C D E F G has six faces. Face A B C D is a square with A B=12; face A B F G is a trapezoid with \overline{A B} parallel to \overline{G F}, B F=A G=8, and G F=6; and face C D E has C E=D E=14. The other three faces are A D E G, B C E F, and E F G. The distance from E to face A B C D is 12 . Given that E G^{2}=p-q \sqrt{r}, where p, q, and r are positive integers and r is not divisible by the square of any prime, find p+q+r.