On the Smith normal form of Varchenko matrix