二君に仕えず(にくんにつかえず)

Japanese vocabulary

Meaning: one can not serve two masters

See it used in real works