#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 6;
const long long INF = (long long)1e18;
long long sum[4 * N];
long long mx[4 * N];
void inc(int v, int tl, int tr, int pos, long long delt) {
  if (pos < tl || tr <= pos) return;
  if (tr - tl == 1) {
    sum[v] += delt;
    mx[v] = sum[v];
    if (tl != 0 && mx[v] < 0) mx[v] = 0;
    return;
  }
  int tm = (tl + tr) / 2;
  inc(2 * v + 1, tl, tm, pos, delt);
  inc(2 * v + 2, tm, tr, pos, delt);
  sum[v] = sum[2 * v + 1] + sum[2 * v + 2];
  mx[v] = max(mx[2 * v + 1], sum[2 * v + 1] + mx[2 * v + 2]);
}
long long get_max(int v) { return mx[v]; }
long long gun[N];
long long arm[N];
vector<pair<int, int> > enem[N];
int main() {
  int n, m, p;
  scanf("%d %d %d", &n, &m, &p);
  for (int x = 0; x < N; ++x) {
    gun[x] = INF;
    arm[x] = INF;
  }
  for (int i = 0; i < n; ++i) {
    int x, cost;
    scanf("%d %d", &x, &cost);
    gun[x] = min(gun[x], (long long)cost);
  }
  for (int i = 0; i < m; ++i) {
    int y, cost;
    scanf("%d %d", &y, &cost);
    arm[y] = min(arm[y], (long long)cost);
  }
  arm[0] = 0;
  arm[N - 1] = INF - 1;
  for (int y = 1; y < N; ++y) {
    if (arm[y] == INF) continue;
    int yy = y - 1;
    while (arm[yy] == INF) --yy;
    inc(0, 0, N, yy, arm[yy] - arm[y]);
  }
  for (int i = 0; i < p; ++i) {
    int x, y, cost;
    scanf("%d %d %d", &x, &y, &cost);
    enem[x].push_back({y, cost});
  }
  long long ans = -INF;
  for (int x = 0; x < N; ++x) {
    ans = max(ans, get_max(0) - gun[x]);
    for (pair<int, int> e : enem[x]) inc(0, 0, N, e.first, e.second);
  }
  printf("%lld\n", ans);
}
