If you can have more words, then it gets real tricky, because how can you tell how many names go with first name and how many go with last?
For example, you could have a two first name, like:
Billy Ray Cyrus
oe you could have a two word last name, like:
Martin Van Buren
So, you really cannot develop a "hard-and-fast" rule that will handle all these possibilities perfectly.