A Queens man will spend the next two to six years in prison for stealing credit cards from gym lockers in Erie County.

George Piha, 51, was sentenced in Erie County Court Wednesday after admitting to entering locker rooms at several fitness and aquatic centers between February and July and stealing credit cards.

He used the cards to buy high-end electronics from Apple and Best Buy stores. Over the course of five months, he spent more than $95,000 on the stolen cards.

Piha’s been charged with identity theft, burglary and scheme to defraud.