#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int read() {
  int f = 1, x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f * x;
}
int qpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = (long long)res * a % mod;
    a = (long long)a * a % mod;
    b >>= 1;
  }
  return res;
}
const int N = 200020, SZ = 1000010, L = 1000000;
int ca[N], cb[N], b[N], a[N];
int cx[SZ], cy[SZ];
long long mx[SZ << 2], tag[SZ << 2];
int sup[SZ], cnt, id[SZ];
vector<pair<int, int> > group[SZ];
void build(int p, int l, int r) {
  if (l == r) {
    mx[p] = sup[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(p * 2, l, mid);
  build(p * 2 + 1, mid + 1, r);
  mx[p] = max(mx[p * 2], mx[p * 2 + 1]);
}
void pushdown(int p) {
  if (!tag[p]) return;
  mx[p * 2] += tag[p], mx[p * 2 + 1] += tag[p];
  tag[p * 2] += tag[p], tag[p * 2 + 1] += tag[p];
  tag[p] = 0;
  return;
}
void update(int p, int l, int r, int L, int R, int v) {
  if (L <= l && r <= R) {
    mx[p] += v;
    tag[p] += v;
    return;
  }
  int mid = (l + r) >> 1;
  pushdown(p);
  if (L <= mid) update(p * 2, l, mid, L, R, v);
  if (R > mid) update(p * 2 + 1, mid + 1, r, L, R, v);
  mx[p] = max(mx[p * 2], mx[p * 2 + 1]);
}
int qry(int p, int l, int r, int v) {
  if (l == r) return mx[p];
  int mid = (l + r) >> 1;
  if (v <= mid)
    return qry(p * 2, l, mid, v);
  else
    return qry(p * 2 + 1, mid + 1, r, v);
}
int n, m, p;
int main() {
  n = read(), m = read(), p = read();
  memset(cx, 0x3f, sizeof(cx));
  memset(cy, 0x3f, sizeof(cy));
  memset(mx, 0xcf, sizeof(mx));
  for (__typeof(1) i = (1); i <= (n); ++i) {
    a[i] = read(), ca[i] = read();
    cx[a[i]] = min(cx[a[i]], ca[i]);
  }
  for (__typeof(1) i = (1); i <= (m); ++i) {
    b[i] = read(), cb[i] = read();
    cy[b[i]] = min(cy[b[i]], cb[i]);
  }
  for (__typeof(1) i = (1); i <= (p); ++i) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    group[x].push_back({y, z});
  }
  for (__typeof(1) i = (1); i <= (1e6); ++i) {
    if (cy[i] == 0x3f3f3f3f)
      continue;
    else
      sup[++cnt] = -cy[i], id[cnt] = i;
  }
  build(1, 1, cnt);
  long long ans = 0xcfcfcfcfcfcfcfcfll;
  for (__typeof(1) i = (1); i <= (1e6); ++i) {
    for (auto e : group[i - 1]) {
      int pos = e.first, profit = e.second;
      int l = 1, r = cnt, ans = 0;
      while (l <= r) {
        int mid = (l + r) >> 1;
        if (id[mid] > pos)
          ans = mid, r = mid - 1;
        else
          l = mid + 1;
      }
      if (ans) update(1, 1, cnt, ans, cnt, profit);
    }
    if (cx[i] == 0x3f3f3f3f) continue;
    ans = max(ans, -cx[i] + mx[1]);
  }
  cout << ans << '\n';
  return 0;
}
