package main import ( "bufio" "fmt" "math" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) var rdr = bufio.NewReaderSize(os.Stdin, 1000000) func main() { sc.Split(bufio.ScanWords) ps := make([][2]int, 3) for i := range ps { ps[i] = [2]int{nextInt(), nextInt()} } ps = append(ps, ps[2]) r := -1 for i := range ps[:len(ps)-1] { n, n2 := (i+1)%3, (i+2)%3 b1 := [2]int{ps[i][0] - ps[n][0], ps[i][1] - ps[n][1]} b2 := [2]int{ps[i][0] - ps[n2][0], ps[i][1] - ps[n2][1]} h1 := math.Hypot(float64(b1[0]), float64(b1[1])) h2 := math.Hypot(float64(b2[0]), float64(b2[1])) if b1[0]*b2[0]+b1[1]*b2[1] == 0 && h1 == h2 { r = i break } } if r == -1 { fmt.Println(-1) return } n, n2 := (r+1)%3, (r+2)%3 dx, dy := ps[n][0]-ps[r][0], ps[n][1]-ps[r][1] fmt.Println(ps[n2][0]+dx, ps[n2][1]+dy) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }