Extended euclidian algorithm

Steps:

EA EEA
StartStop
Check:
StopStart

EA EEA ; Check