やんす

Etymology
Originally, occupational dialect of prostitutes in  at the beginning of the early modern period. Later generalized, and became limited to the usage of politeness.

There are some theories about the etymology; said to be changed from the following phrases:

Usage notes
Attached to the of conjugated words and.