#include <bits/stdc++.h>
#define fi first
#define se second
#define For(i, a, b) for (int i = (a); i <= (b); ++i)
#define ForD(i, a, b) for (int i = (a); i >= (b); --i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repD(i, n) for (int i = (n) - 1; i >= 0; --i)
#define coutE(x) {cout << x << '\n'; return;}
#define pb push_back
#define pf push_front
#define all(x) x.begin(), x.end()
#define bs binary_search
#define ub upper_bound
#define lb lower_bound
#define endl '\n'
#define db long double
#define ll long long
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define int long long
using namespace std;
const int N = 2e5 + 5;
const int INF = 1e9;
const long long LINF = 1e18;
void add(ii &a, ii b){
a.fi += b.fi;
a.se += b.se;
}
int n, m, q;
int a[N], b[N], x[N], y[N];
vi g[N];
ii ed[N], sec[N];
int up[N][20], h[N];
int in[N], out[N], timer;
int l[N], r[N], ans[N];
vi quer[N];
struct BIT{
int sum[N], cnt[N];
void reset(){
For(i, 1, 2*n) sum[i] = cnt[i] = 0;
}
void Update(int i, int v1, int v2){
for (; i <= 2*n; i += i & -i) sum[i] += v1, cnt[i] += v2;
}
void update(int l, int r, int v){
Update(l, v, 1);
Update(r, -v, -1);
}
ii get(int i){
ii res = {0, 0};
for (; i; i -= i & -i) add(res, {sum[i], cnt[i]});
return res;
}
} BIT;
void dfs(int u){
in[u] = ++timer;
for (int v: g[u]) if (v != up[u][0]){
h[v] = h[u] + 1;
up[v][0] = u;
For(j, 1, 17)
up[v][j] = up[up[v][j - 1]][j - 1];
dfs(v);
}
out[u] = ++timer;
}
int lca(int u, int v)
{
if (h[u] < h[v]) swap(u,v);
int z = (int)(log2(h[u]));
for (int i = z; i>=0; i--)
{
if (h[u] - h[v] >= (1<<i)) u = up[u][i];
}
if (u == v) return u;
for (int i = z; i>=0; i--)
{
if (up[u][i] != up[v][i])
{
u = up[u][i];
v = up[v][i];
}
}
return up[u][0];
}
ii get(int u, int v){
ii a = BIT.get(in[u]), b = BIT.get(in[v]), c = BIT.get(in[lca(u, v)]);
return {a.fi + b.fi - 2 * c.fi, a.se + b.se - 2 * c.se};
}
void solve(){
cin >> n >> m >> q;
For(i, 1, n - 1){
int u, v; cin >> u >> v;
g[u].pb(v); g[v].pb(u);
ed[i] = {u, v};
}
dfs(1);
For(i, 1, n - 1){
if (h[ed[i].fi] > h[ed[i].se]){
swap(ed[i].fi, ed[i].se);
}
}
For(i, 1, m) cin >> sec[i].se >> sec[i].fi;
sort(sec + 1, sec + m + 1);
For(i, 1, m) sec[i].se = ed[sec[i].se].se;
For(i, 1, q){
cin >> a[i] >> b[i] >> x[i] >> y[i];
l[i] = 0; r[i] = m;
ans[i] = LINF;
}
int ok = 1;
while (ok){
ok = 0;
BIT.reset();
For(i, 0, m) quer[i].clear();
For(i, 1, q){
if (l[i] > r[i]) continue;
ok = 1;
quer[(l[i] + r[i])/2].pb(i);
}
For(t, 0, m){
if (t){
auto [c, u] = sec[t];
BIT.update(in[u], out[u], c);
}
for (int i: quer[t]){
auto [s, c] = get(a[i], b[i]);
int u = a[i], v = b[i];
if (s <= y[i]) l[i] = t + 1, ans[i] = c;
else r[i] = t - 1;
}
}
}
For(i, 1, q){
auto [s, c] = get(a[i], b[i]);
cout << max(x[i] - c + ans[i], -1ll) << endl;
}
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
solve();
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CgojZGVmaW5lIGZpIGZpcnN0CiNkZWZpbmUgc2Ugc2Vjb25kCgojZGVmaW5lIEZvcihpLCBhLCBiKSBmb3IgKGludCBpID0gKGEpOyBpIDw9IChiKTsgKytpKQojZGVmaW5lIEZvckQoaSwgYSwgYikgZm9yIChpbnQgaSA9IChhKTsgaSA+PSAoYik7IC0taSkKI2RlZmluZSByZXAoaSwgbikgZm9yIChpbnQgaSA9IDA7IGkgPCAobik7ICsraSkKI2RlZmluZSByZXBEKGksIG4pIGZvciAoaW50IGkgPSAobikgLSAxOyBpID49IDA7IC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