A graph artist was painting a logo in the shape of a regular polygon. She measured one of the exterior angle to be 45 degrees. How many sides does this polygon has? What is the name of such polygon?