#include #include #include #include #include #include #include #include #include #define MOD 1000000007 #define mkp make_pair typedef long long ll; using namespace std; int N,M,P,Q,T; vector> g[2020]; ll dist[3][2020]; const ll INF=1e18; void dijkstra(int id,int start){ for(int i=1;i<=N;i++) dist[id][i]=INF; dist[id][start]=0; priority_queue> PQ; PQ.push(mkp(0,start)); while(!PQ.empty()){ ll co,tp; tie(co,tp)=PQ.top(); PQ.pop(); co*=(-1); if(dist[id][tp]>N>>M>>P>>Q>>T; for(int i=0;i>a>>b>>c; g[a].push_back(mkp(b,c)); g[b].push_back(mkp(a,c)); } dijkstra(0,1); dijkstra(1,P); dijkstra(2,Q); if(dist[0][P]+dist[1][Q]+dist[0][Q]<=T){ cout<