Is this an ilegal formation? I lost 2-0 against it using a legal formation

DR--DC--DC--DL
------DMC------
MR------MC----
------AMC------
----ST---ST----

I was using this formation:

DR--DC--DC--DL
------DMC------
----MC--MC----
------AMC------
----ST---ST----

So is it ilegal? I thought it was so I left that formation because i thaught I might win... it wasn't like that.