At a fun park, the cost of a rollercoaster ride and a ferris wheel ride is $10. The cost of a Gravitron ride and a Ferris wheel ride is $12. The cost of a rollercoaster ride and a Gravitron ride is $14. What is the cost of each ride?