Global behavior of the nonlinear difference equation xn+1=f(xn-s,xn-t)