  An $n$-ary operation $Q:S^n\to S$ is called an $n$-ary quasigroup of order
$|S|$ if in the equation $x_0=Q(x_1,...,x_n)$ knowledge of any $n$ elements of
$x_0,...,x_n$ uniquely specifies the remaining one. An $n$-ary quasigroup $Q$
is (permutably) reducible if
$Q(x_1,...,x_n)=P(R(x_{s(1)},...,x_{s(k)}),x_{s(k+1)},...,x_{s(n)})$ where $P$
and $R$ are $(n-k+1)$-ary and $k$-ary quasigroups, $s$ is a permutation, and
$1<k<n$. An $m$-ary quasigroup $R$ is called a retract of $Q$ if it can be
obtained from $Q$ or one of its inverses by fixing $n-m>0$ arguments.
  We show that every irreducible $n$-ary quasigroup has an irreducible
$(n-1)$-ary or $(n-2)$-ary retract; moreover, if the order is finite and prime,
then it has an irreducible $(n-1)$-ary retract. We apply this result to show
that all $n$-ary quasigroups of order 5 or 7 whose all binary retracts are
isotopic to $Z_5$ or $Z_7$ are reducible for $n>3$.
  Keywords: $n$-ary quasigroups, retracts, reducibility, latin hypercubes
