#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5, up = 1000000;
long long n, m, k, bit[N], t[N << 2], lz[N << 2];
void add(long long x, long long v) {
  x = up - x + 1;
  while (x <= up) bit[x] = min(bit[x], v), x += x & -x;
}
long long query(long long x) {
  long long ans = 0x3f3f3f3f;
  x = up - x + 1;
  while (x) ans = min(ans, bit[x]), x -= x & -x;
  return ans;
}
void fix(long long l, long long r, long long k, long long x, long long v) {
  if (l == r) {
    t[k] = max(t[k], v);
    return;
  }
  long long m = l + r >> 1;
  if (x <= m)
    fix(l, m, k << 1, x, v);
  else
    fix(m + 1, r, k << 1 | 1, x, v);
  t[k] = max(t[k << 1], t[k << 1 | 1]);
}
void update(long long l, long long r, long long k) {
  if (l != r) lz[k << 1] += lz[k], lz[k << 1 | 1] += lz[k];
  t[k] += lz[k];
  lz[k] = 0;
}
void fix(long long l, long long r, long long k, long long x, long long y,
         long long v) {
  if (x > y) return;
  if (lz[k]) update(l, r, k);
  if (r < x || l > y) return;
  if (l >= x && r <= y) {
    lz[k] += v;
    update(l, r, k);
    return;
  }
  long long m = l + r >> 1;
  fix(l, m, k << 1, x, y, v);
  fix(m + 1, r, k << 1 | 1, x, y, v);
  t[k] = max(t[k << 1], t[k << 1 | 1]);
}
struct node {
  long long x, y, z;
  bool operator<(const node& o) const { return x < o.x; }
} a[N];
int main() {
  memset(bit, 0x3f3f3f3f, sizeof(bit));
  memset(t, -0x3f3f3f3f, sizeof(t));
  scanf("%lld%lld%lld", &n, &m, &k);
  long long ans1 = 0, ans2 = 0;
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    add(x, y);
    ans1 = max(ans1, y);
  }
  for (long long i = 1; i <= m; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    fix(1, up, 1, x, -y);
    ans2 = max(ans2, y);
  }
  for (long long i = 1; i <= k; i++)
    scanf("%lld%lld%lld", &a[i].x, &a[i].y, &a[i].z);
  sort(a + 1, a + 1 + k);
  long long ans = -(ans1 + ans2);
  for (long long i = 1; i <= k; i++) {
    fix(1, up, 1, a[i].y + 1, up, a[i].z);
    long long res = t[1] - query(a[i].x + 1);
    ans = max(ans, res);
  }
  printf("%lld\n", ans);
}
