Study on the Electronic Structure of Hexagonal and Orthorhombic YMnO3