Original: Hungary and Austria maintained separate parliaments, each with its own prime minister.
Simplified: Hungary and Austria had different parliaments. Each had its own prime minister.