I have the following code to obtain the solutions to a system of polynomial equations

```

Func5[B_] := 
  Module[{a, b, c, sa, ca, sb, cb, sc, cc, sd, cd, vec, trigs, polys, 
    allfuns, gb, sol, oldeqns, neweqns}, vec = {a, b, c, d, 0};
   trigs = -B . Sin[Transpose[B] . vec];
   polys = 
    TrigExpand /@ trigs /. {Sin[a] -> sa, Sin[b] -> sb, Sin[c] -> sc, 
      Sin[d] -> sd, Cos[a] -> ca, Cos[b] -> cb, Cos[c] -> cc, 
      Cos[d] -> cd};
   allfuns = 
    Join[
     polys, {sa^2 + ca^2 - 1, sb^2 + cb^2 - 1, sc^2 + cc^2 - 1, 
      sd^2 + cd^2 - 1}];
   gb = GroebnerBasis[allfuns, {sa, sb, sc, sd}, {ca, cb, cc, cd}];
   sol = 
    Reduce[gb == 0] /. {sa -> Sin[a], sb -> Sin[b], sc -> Sin[c], 
      sd -> Sin[d], ca -> Cos[a], cb -> Cos[b], cc -> Cos[c], 
      cd -> Cos[d]};
   oldeqns = And @@ Thread[trigs == 0];
   neweqns = FullSimplify[oldeqns && sol];
   all1 = Union[allfuns, gb];
    Reduce[
      neweqns && 0 <= a < 2 \[Pi] && 0 <= b < 2 \[Pi] && 
       0 <= c < 2 Pi && 0 <= d < 2 Pi, {a, b, c, d}, Reals] // 
     FullSimplify];

Clear[B]; B = {{1,0,0,-1,0,0},{-1,-1,-1,0,-1,0},{0,1,0,0,0,1},{0,0,0,0,1,-1},{0,0,1,1,0,0}};
GraphPlot[UndirectedGraph[IncidenceGraph[B]], 
 VertexLabels -> Automatic, ImageSize -> Small, 
 PlotLabel -> "graph 22224"]
Func5[B]

```

The result is as follows

[![enter image description here](https://i.stack.imgur.com/qCAda.png)](https://i.stack.imgur.com/qCAda.png)

How to convert it to the below form?

[![enter image description here](https://i.stack.imgur.com/0mTVm.png)](https://i.stack.imgur.com/0mTVm.png)

Thanks!