The characterization of graphs with eigenvalue -1 of multiplicity n-4 or n-5