import java.util.*;
public class Main {
static class Point {
double x,y;
Point(double a, double b) {
x = a;
y = b;
}
}
static class Line {
Point pointA, pointB;
Line(Point a, Point b) {
pointA = a;
pointB = b;
}
}
static double getDistance(Point P, Line L) {
double A = L.pointB.y-L.pointA.y;
double B = L.pointA.x-L.pointB.x;
double C = -B*L.pointA.y + L.pointA.x*(-A);
double temp = Math.pow(A,2)+Math.pow(B,2);
double lower = Math.pow(temp,0.5);
temp = A*P.x+B*P.y+C;
double upper = Math.abs(temp);
return upper/lower;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int sx = scanner.nextInt();
int sy = scanner.nextInt();
int tx = scanner.nextInt();
int ty = scanner.nextInt();
Point pointA = new Point(sx, sy);
Point pointB = new Point(tx, ty);
Point pointC = new Point(a, b);
Line line = new Line(pointA, pointB);
System.out.printf("%.2f", getDistance(pointC, line));
scanner.close();
}
}