  The joint detection of the gravitational wave GW170817, of the short
$\gamma$-ray burst GRB170817A and of the kilonova AT2017gfo, generated by the
the binary neutron star merger observed on August 17, 2017, is a milestone in
multimessenger astronomy and provides new constraints on the neutron star
equation of state. We perform Bayesian inference and model selection on
AT2017gfo using semi-analytical, multi-components models that also account for
non-spherical ejecta. Observational data favor anisotropic geometries to
spherically symmetric profiles, with a log-Bayes' factor of ${\sim}10^{4}$, and
favor multi-component models against single-component ones. The best fitting
model is an anisotropic three-component composed of dynamical ejecta plus
neutrino and viscous winds. Using the dynamical ejecta parameters inferred from
the best-fitting model and numerical-relativity relations connecting the ejecta
properties to the binary properties, we constrain the binary mass ratio to
$q<1.54$ and the reduced tidal parameter to $120<\tilde\Lambda<1110$. Finally,
we combine the predictions from AT2017gfo with those from GW170817,
constraining the radius of a neutron star of $1.4~{\rm M}_\odot$ to
$12.2\pm0.5~{\rm km}$ ($1\sigma$ level). This prediction could be further
strengthened by improving kilonova models with numerical-relativity
information.
