How to Run pipeline for 2 different github branches in 2 different circle ci accounts

I have 2 git branches: DEV and Master.
Dev - should run on DEV Circle CI account.
Master should run on PROD circle CI account.

For both the things i need to use a common config.yml file.
how is this possible.