PUMaC 2015 Individual B Problem 2

On a circle \omega_{1}, four points A, B, C, D lie in that order. Prove that C D^{2}=A C \cdot B C+A D \cdot B D if and only if at least one of C and D is the midpoint of \operatorname{arc} A B.