Language Models Represent Beliefs of Self and Others