Which of the following factors led Greek communities to build both an army and a navy?

their location on a peninsula

their access to many rivers

their access to mountains

their location near the Middle East