static boolean onHelper(int y1, int x1, int y2,int x2,int y3,int x3) {
		if (y1==y2) {
			return Math.min(x1, x2) <= x3 && x3 <= Math.max(x1, x2);
		} else if (x1==x2) {
			return Math.min(y1, y2) <= y3 && y3 <= Math.max(y1, y2);
		}
		return false;
	}