from math import sqrt

# exercice 55 P 174
def mi(x1,y1,x2,y2):
  return ((x2+x1)/2,(y2+y1)/2)

def par(xA,yA,xB,yB,xC,yC,xD,yD):
  para=False
  if mi(xA,yA,xC,yC)==mi(xB,yB,xC,yC,xD,yD) :
    para=True
  return para

# exercices 77P177
def determinant(x1,y1,x2,y2):
  return x1*y2-y1*x2

def alignement(xA,yA,xB,yB,xC,yC) :
  x1,y1=xB-xA,yB-yA
  x2,y2=xC-xA,yC-yA
  if determinant(x1,y1,x2,y2)==0:
    return True
  else :
    return False

# exercice 87P178
def dist(xA,yA,xB,yB):
  return sqrt(...)

def inscrit(x1,y1,x2,y2,x3,y3,x4,y4):
  prodDiag=dist(x1,y1,x3,y3)*dist(x2,y2,x4,y4)
  prodCote1=dist(x1,y1,x2,y2)*dist(x3,y3,x4,y4)
  prodCote2=dist(x2,y2,x3,y3)*dist(x1,y1,x4,y4)
  if prodCote1+prodCote2==prodDiag:
    print("quadrilatère inscriptible")
  else :
    print("quadrilatère non inscriptible")