Learned about using GCD and also about gnu libstdc++ __gcd function

Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarreddy@gmail.com>