A two-variable linear [Diophantine equation](/page/Diophantine%20Equation) has an integer solution exactly when the [greatest common divisor](/page/Greatest%20Common%20Divisor) of the two coefficients divides the constant term. This is the basic solvability test behind explicit solution formulas for linear equations over the integers.