Labor to form majority government