Rijeka, Trieste and Krk