  We study partition function of four-dimensional $\mathcal{N}=1$
supersymmetric field theory on $T^2 \times S^2$. By applying supersymmetry
localization, we show that the $T^2 \times S^2$ partition function is given by
elliptic genus of certain two-dimensional $\mathcal{N}=(0,2)$ theory. As an
application, we discuss a relation between 4d Seiberg duality duality and 2d
$(0,2)$ triality, proposed by Gadde, Gukov and Putrov. In other examples, we
identify 4d theories giving elliptic genera of K3, M-strings and E-strings. In
the example of K3, we find that there are two 4d theories giving the elliptic
genus of K3. This would imply new four-dimensional duality.
