Name the two groups in which various sources of energy are classified. State on what basis are they classified.