From Middle English theiren, compare hern. Displaced in standard speech by the -s form, theirs, which see for more.
theirn