Recognition of finite groups by a set of orders of their elements