#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long inf = 2e9 + 10;
int n, m, k;
long long a[maxn], b[maxn];
struct node {
  long long x, y, z;
} c[maxn];
bool cmp(node x, node y) {
  if (x.x != y.x) return x.x < y.x;
  return x.y < y.y;
}
long long t[maxn << 2];
void build(int now, int l, int r) {
  if (l == r) {
    t[now] = -b[l];
    return;
  }
  int m = (l + r) >> 1;
  build(now * 2, l, m);
  build(now * 2 + 1, m + 1, r);
  t[now] = max(t[now * 2], t[now * 2 + 1]);
}
long long la[maxn << 2];
void push(int now) {
  if (!la[now]) return;
  la[now * 2] += la[now];
  la[now * 2 + 1] += la[now];
  t[now * 2] += la[now], t[now * 2 + 1] += la[now];
  la[now] = 0;
}
void update(int now, int l, int r, int L, int R, int val) {
  if (L > R) return;
  if (l == L && r == R) {
    la[now] += val;
    t[now] += val;
    return;
  }
  push(now);
  int m = (l + r) >> 1;
  update(now * 2, l, m, L, min(R, m), val);
  update(now * 2 + 1, m + 1, r, max(L, m + 1), R, val);
  t[now] = max(t[now * 2], t[now * 2 + 1]);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i < maxn; i++) a[i] = b[i] = inf;
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    a[x] = min(a[x], y);
  }
  for (int i = 1; i <= m; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    b[x] = min(b[x], y);
  }
  for (int i = 1; i <= k; i++) scanf("%lld%lld%lld", &c[i].x, &c[i].y, &c[i].z);
  sort(c + 1, c + k + 1, cmp);
  int f = 1000000;
  build(1, 1, f);
  int now = 1;
  long long ans = -inf;
  for (int i = 1; i <= f; i++) {
    while (c[now].x < i && now <= k)
      update(1, 1, f, c[now].y + 1, f, c[now].z), now++;
    ans = max(ans, t[1] - a[i]);
  }
  printf("%lld", ans);
  return 0;
}
