The affirmative solution to Salem's problem