  We derive a set of identities for the theta functions on compact Riemann
surfaces which generalize the famous trisecant Fay identity. Using these
identities we obtain quasiperiodic solutions for a multidimensional
generalization of the Hirota bilinear difference equation and for a
multidimensional Toda-type system.
