I trying to create a code that calculate the distance between 2 point. I have 3 point (Point1, Point2, and Point3) and I want to compare each point combination (1 vs 2, 1 vs 3, and 2 vs 3) and find out which combination has the longest distance with expected result:

`The distance between PointX and PointY is the longest, with distance {distance_XY}`

The code that I used was:

```
def longest_distance(X,Y,Z):
  a = X[0]
  b = X[1]
  c = Y[0]
  d = Y[1]
  e = Z[0]
  f = Z[1]
  distance_XY = (((a-c)**2) + ((b-d)**2)) ** (1/2)
  distance_XZ = (((a-e)**2) + ((b-f)**2)) ** (1/2)
  distance_YZ = (((c-e)**2) + ((d-f)**2)) ** (1/2)
  if distance_XY > distance_XZ > distance_YZ:
    print(f'The distance between PointX and PointY is the longest, with distance {distance_XY}')
  elif distance_XY < distance_XZ > distance_YZ:
    print(f'The distance between PointX and PointZ is the longest, with distance {distance_XZ}')
  elif distance_XY < distance_XZ < distance_YZ:
    print(f'The distance between PointY and PointZ is the longest, with distance {distance_YZ}')

```

But that code only worked with some number. When I try using the number below it worked:

```
X = [0,0]
Y = [5,5]
Z = [10,10]

longest_distance(X,Y,Z)

The distance between PointX and PointZ is the longest, with distance 14.142135623730951

```

When I try with different number like:

```
X = [0,0]
Y = [10,-10]
Z = [4,-3]

longest_distance(X,Y,Z)

```

The result should be `The distance between PointX and PointY is the longest, with distance 14.142135623730951`, but nothing happened and there is no error so I don't really know how to correct it