Common Factor Finder

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