Divisibility rule for 4: A number with 3 or more digits is divisible by 4 if the number formed by its last two digits (i.e. ones and tens) is divisible by 4.
Divisibility rule for 8: A number with 4 or more digits is divisible by 8 if the number formed by the last three digits is divisible by 8.
Applying the above divisibility rules,
31795072 → Divisible by 4 as its last two digits are divisible by 4.
31795072 → Divisible by 8 as its last three digits are divisible by 8.