#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long inf = 0x3f3f3f3f3f;
long long n, m, p;
long long ans = -1 * inf, maxxa, maxxd;
struct node {
  long long a, b;
};
vector<node> g[maxn];
long long q[maxn];
long long c[maxn];
long long tree[maxn * 4];
long long lazy[maxn * 4];
void build(int l, int r, int rt) {
  if (l == r) {
    if (c[l] == 0)
      tree[rt] = -1 * inf;
    else
      tree[rt] = c[l];
    return;
  }
  int mid = (l + r) / 2;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  tree[rt] = max(tree[rt << 1], tree[rt << 1 | 1]);
}
void update(int l, int r, int L, int R, int rt, long long value) {
  if (L <= l && r <= R) {
    tree[rt] += value;
    lazy[rt] += value;
    return;
  }
  if (lazy[rt]) {
    tree[rt << 1] += lazy[rt];
    tree[rt << 1 | 1] += lazy[rt];
    lazy[rt << 1] += lazy[rt];
    lazy[rt << 1 | 1] += lazy[rt];
    lazy[rt] = 0;
  }
  int mid = (l + r) / 2;
  if (mid >= L) update(l, mid, L, R, rt << 1, value);
  if (mid < R) update(mid + 1, r, L, R, rt << 1 | 1, value);
  tree[rt] = max(tree[rt << 1], tree[rt << 1 | 1]);
}
int main() {
  scanf("%lld%lld%lld", &n, &m, &p);
  for (int i = 0; i < n; i++) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    if (q[a] == 0)
      q[a] = -1 * b;
    else
      q[a] = max(q[a], -1 * b);
    maxxa = max(maxxa, a);
  }
  for (int i = 0; i < m; i++) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    if (c[a] == 0)
      c[a] = -1 * b;
    else
      c[a] = max(c[a], -1 * b);
    maxxd = max(maxxd, a);
  }
  build(1, maxxd, 1);
  for (int i = 0; i < p; i++) {
    node temp;
    long long a;
    scanf("%lld%lld%lld", &a, &temp.a, &temp.b);
    g[a].push_back(temp);
  }
  for (int i = 1; i <= maxxa; i++) {
    if (q[i] != 0) ans = max(ans, q[i] + tree[1]);
    for (int j = 0; j < g[i].size(); j++) {
      if (g[i][j].a >= maxxd)
        continue;
      else
        update(1, maxxd, g[i][j].a + 1, maxxd, 1, g[i][j].b);
    }
  }
  cout << ans << endl;
  return 0;
}
