Joko is right, only the red/black matters, the 3 white wires do not matter as they are the 3 phase AC coming from the alternator.
Do not coat the junctions with dielectric grease. I did it and regret big time. My onboard voltmeter gradually showed a voltage drop as the heat causes the silicon grease to migrate and coat all mating surfaces. Bike could not pull to top speed. Problem went away after cleaning away all the grease, which was a bitch to do as it has spread from the heat.
The reason the junctions fry is because the contacts come loose with time. This in turn cause contact resistant and arcing, generating heat at the point of resistance (the loose connector). It's almost always the red/black that frys because they're high current-->more arcing. Contact grease will further interfere with good conductivity although they're great at keeping water/moisture away. Water is not the issue here, it's poor contact, so shove a screwdriver into the individual connector and make the female end 'close up' so that it grips super tight on the male end (rectifier end).
The Yamaha stock connectors come really loose, so I suggest you guys do this pre-emptively, it will save u the trouble of hunting down a plug that will match the rectifier.