No, these formats are not illegal. However, downloading or distributing copyrighted material without permission is illegal and can result in legal consequences.