Adapted exam for Alexei's gcd patch.