Teaser 2987: Table mats

From The Sunday Times, 22nd December 2019 [link]

Beth and Sam were using computers to design two table mats shaped as regular polygons.

The interior angles of Beth’s polygon were measured in degrees; Sam’s were measured in grads. [A complete turn is equivalent to 360 degrees or 400 grads.]

On completion they discovered that all of the interior angles in the 2 polygons had the same numerical whole number value.

If I told you the last digit of that number, you should be able to work out the number of edges in (a) Beth’s table mat and (b) Sam’s table mat.

What were those numbers?