Exercise 6.6(Palindrome) and 6.8(GCD)