Supersymmetric gauge theories in five and six dimensions