  We consider Maxwell and Yang-Mills (YM) fields together, interacting through
gravity both in Einstein and Gauss-Bonnet (GB) theories. For this purpose we
choose two different sets of Maxwell and metric ansaetze. In our first ansatz,
asymptotically for $r\to 0$ (and $N>4$) the Maxwell field dominants over the YM
field. In the other asymptotic region, $r\to \infty $, however, the YM field
becomes dominant. For N=3 and N=4, where the GB term is absent, we recover the
well-known Ba\U{f1}ados-Teitelboim-Zanelli (BTZ) and Reissner-Nordstr\U{f6}m
(RN) metrics, respectively. The second ansatz corresponds to the case of
constant radius function for $S^{N-2}$ part in the metric. This leads to the
Bertotti-Robinson (BR) type solutions in the underlying theory.
