import java.io.*;
import java.util.*;

public class trenches_mb {
    static final int MAX_C = 10000;

    static class Point {
        int x, y;

        Point(int xx, int yy) {
            x = xx;
            y = yy;

            assert Math.abs(x) <= MAX_C;
            assert Math.abs(y) <= MAX_C;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }
    }

    static boolean test(Point s0, Point e0, Point s1, Point e1, long a, long b, long c) {
        long sv0 = a * s0.x + b * s0.y + c;
        long ev0 = a * e0.x + b * e0.y + c;
        long sv1 = a * s1.x + b * s1.y + c;
        long ev1 = a * e1.x + b * e1.y + c;
        return (sv0 != 0) && (sv1 != 0) && (ev0 != 0) && (ev1 != 0) && 
               ((sv0 < 0) == (ev0 < 0)) && 
               ((sv1 < 0) == (ev1 < 0)) &&
               ((sv0 < 0) != (sv1 < 0));
    }

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader("trenches.in"));
        PrintWriter out = new PrintWriter("trenches.out");
        while (true) {
            StringTokenizer st0 = new StringTokenizer(in.readLine());
            StringTokenizer st1 = new StringTokenizer(in.readLine());

            Point s0 = new Point(Integer.parseInt(st0.nextToken()), Integer.parseInt(st0.nextToken()));
            Point e0 = new Point(Integer.parseInt(st0.nextToken()), Integer.parseInt(st0.nextToken()));
            Point s1 = new Point(Integer.parseInt(st1.nextToken()), Integer.parseInt(st1.nextToken()));
            Point e1 = new Point(Integer.parseInt(st1.nextToken()), Integer.parseInt(st1.nextToken()));

            if (s0.toString().equals(s1.toString())) {
                break;
            }

            in.readLine();

            int minx0 = Math.min(s0.x, e0.x);
            int miny0 = Math.min(s0.y, e0.y);
            int maxx0 = Math.max(s0.x, e0.x);
            int maxy0 = Math.max(s0.y, e0.y);

            int minx1 = Math.min(s1.x, e1.x);
            int miny1 = Math.min(s1.y, e1.y);
            int maxx1 = Math.max(s1.x, e1.x);
            int maxy1 = Math.max(s1.y, e1.y);

            if (minx0 > maxx1) {
                out.println("-2 0 " + (minx0 + maxx1));    
            } else if (maxx0 < minx1) {
                out.println("-2 0 " + (minx1 + maxx0));    
            } else if (miny0 > maxy1) {
                out.println("0 -2 " + (miny0 + maxy1));    
            } else if (maxy0 < miny1) {
                out.println("0 -2 " + (miny1 + maxy0));    
            } else {
                int a, b, c;

                a = 2 * (e0.y - s0.y);
                b = 2 * (s0.x - e0.x);
                c = -(a * s0.x + b * s0.y);

                if (test(s0, e0, s1, e1, a, b, c - 1)) {
                    out.println(a + " " + b + " " + (c - 1));
                    continue;
                }
                if (test(s0, e0, s1, e1, a, b, c + 1)) {
                    out.println(a + " " + b + " " + (c + 1));
                    continue;
                }

                a = 2 * (e1.y - s1.y);
                b = 2 * (s1.x - e1.x);
                c = -(a * s1.x + b * s1.y);

                if (test(s0, e0, s1, e1, a, b, c - 1)) {
                    out.println(a + " " + b + " " + (c - 1));
                    continue;
                }
                if (test(s0, e0, s1, e1, a, b, c + 1)) {
                    out.println(a + " " + b + " " + (c + 1));
                    continue;
                }

                throw new AssertionError("The trenches intersect");
            }
        }        
        in.close();
        out.close();
    }
}