Common Factor Finder

Use the sliders to enter two numbers for which you would like to find common factors Now drag the RED dot on the horizontal axis When the vertical coordinates of GOLD dots are BOTH integers - the horizontal coordinate of the RED dot is a common factor of your two numbers Why does this work?