  Five and six dimensional SUSY gauge theories, with one or two compactified
directions, are discussed. The 5d theories with the matter hypermultiplets in
the fundamental representation are associated with the twisted $XXZ$ spin
chain, while the group product case with the bi-fundamental matter corresponds
to the higher rank spin chains. The Riemann surfaces for $6d$ theories with
fundamental matter and two compact directions are proposed to correspond to the
$XYZ$ spin chain based on the Sklyanin algebra. We also discuss the obtained
results within the brane and geometrical engeneering frameworks and explain the
relation to the toric diagrams.
