The answer is yes & no. The speaker will work will work either way but for the speaker to perform properly you want to have the correct wire on the correct side. If wired correctly, the speakers are in phase. If the wires are reversed the term is out of phase. The easiest way to tell which factory wire is + & which one is - is to check the stock speakers with a battery. I usually use a 9 volt, but AA, AAA, etc. will work. Cut the wire on the back of the factory speaker wire connector. Next, attach one wire to the + side of the battery & the other wire to the - side of the battery. The speaker cone will move. If speaker moved toward the front, you've got + side of the speaker on the + side of the battery (in phase). If cone moves toward the back then the wires are reversed. Now that you have determined which factory wire is + & -, just match the wires with appropriate side of the new speaker.
Before a wiring guru steps in & corrects me. Let me state there are times when it is desireable to reverse the wires, such as when you want to change the impedance load when using multiple speakers on one channel, but this is usually not the case.