Generally, each of the Ten Commandments is written in its own paragraph in the Torah, except for the 1st two. Shmot (Ex.) 20:2 is the 1st commandmnet - "I am G-d" and the 2nd commandment is from Shmot (Ex.) 20:3-6). These two commandments are written in a single paragraph.
Additionally, there is a special form of Torah trope known as "ta'am elyon" which is customarily used when reading the 10 commandments in shul. This format treats all the verses that comprise one commandment as if it were a single verse, rather than the way it is "divided" as separate verses. (Yes, I am aware that the concept of psukim - verses is only possible by knowing the trope. In viewing the written Torah scroll, one would not know this.)
So, my question is that based on both the written format as well as the trope usage - whether ta'am elyon or tachton, how did chaza"l derive two separate commandments from this single paragraph?