Use the Euclidean algorithm to find integers x and y such that 164x+39y=1. State your answer as a list with x first and y second, separated by a comma.
Euclidean algorithm computes the GCD of 2 numbers, which you already have. What you want is called the "Extended Euclidean Algorithm" to find x and y, which are called "Bezout's coefficients" !! This is along and involved procedure which can be found here: https://www.youtube.com/watch?v=6KmhCKxFWOs
The answer is: x==5 and y== - 21