Given A = 1,8,15,…1975. B = 2,13,24…1982. Find the number of terms common to both the arithmetic progressions.