int gcd(int a, int b) {
  int t = 1;
  
  while (t != 0) {
    t = m % n;
    m = n;
    n = t;
  }
  
  return m;
}