public static boolean check(Point[] a) {

        double k;
        double z;

        if (a.length < 1) return true;

        k = ((double)a[0].x - (double)a[1].x) / ((double)a[0].y - (double)a[1].y);

        for (int i = 1; i < a.length; i++) {
            z = ((double)a[0].x - (double)a[i].y) / ((double)a[0].y - (double)a[i].y);
            if (z != k) return false;
        }

        return true;
    }