Arpa and an exam about geometry

From Codeforces 851B. Three points A, B and C are given by a flat array of six integers [ax, ay, bx, by, cx, cy]. Determine whether some point O and some angle exist such that rotating A around O by that angle lands exactly on B, and rotating B around O by the same angle lands exactly on C.

Return 1 when such a rotation exists, otherwise 0. This is the executable adaptation of the original Yes or No output.

Examples
Input: [0,1,1,0,0,-1]
Output: 1
Hints

Arpa and an exam about geometry

**From Codeforces 851B.** Three points `A`, `B` and `C` are given by a flat array of six integers `[ax, ay, bx, by, cx, cy]`. Determine whether some point `O` and some angle exist such that rotating `A` around `O` by that angle lands exactly on `B`, and rotating `B` around `O` by the same angle lands exactly on `C`.