In a triangle ABC right angled at B, ∠ACB=θ. If tanθ=512, then find the value of (1+cos θ)×(1−sinθ)(1+sinθ)×(1−cosθ).