No, downloading from YIFY is not illegal. However, downloading copyrighted materials without permission is considered illegal in all countries. It is also a criminal offense to share copyrighted material without permission.
As a platform, YIFY itself is not illegal. However, YIFY may have been used to share copyrighted material without permission. That's why many people consider it unethical to download materials from YIFY.
Also, there are no guarantees that any downloaded files from YIFY are free of viruses or malware. You should install a virus scanner or malware removal software before downloading a file from YIFY.