En and y are pronouns used to replace other words but here they didn't replace anything ! I mean this thing replaced by en or y should be mentioned firstly in another part so that you can use en or y
En and y are used to replace:
For en : forms like de + noun
Expl : il mange du bonbons : il en mange
Expl : il vient du paris : il en vient
For y : forms like à + noun
Expl : je vais á paris : j'y vais !