def x a,b;(a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]);end a=[*gets.split.map(&:to_i).each_slice(2)] g=a.zip(a.rotate).map{|i,j|x i,j} n=g.zip(g.rotate).index{|i,j|i==j} puts n ?a.rotate(n-2).inject{|(i,j),(k,l)|[i+k-a[n-2][0],j+l-a[n-2][1]]}*" ":-1