#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &n) {
  n = 0;
  T f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (isdigit(c)) n = n * 10 + c - '0', c = getchar();
  n *= f;
}
struct node {
  int x, y;
  long long w;
  friend bool operator<(node a, node b) { return a.x < b.x; }
} a[1000005];
int n, m, q, tot, vis[1000005];
long long x[1000005], y[1000005], mxx[1000005], mxy[1000005], b[1000005];
long long s[1000005 * 4], tag[1000005 * 4];
void push_down(int p) {
  s[(p << 1)] += tag[p], s[(p << 1 | 1)] += tag[p];
  tag[(p << 1)] += tag[p], tag[(p << 1 | 1)] += tag[p];
  tag[p] = 0;
}
void update(int p, int l, int r, int ul, int ur, long long k) {
  if (l >= ul && r <= ur) {
    tag[p] += k, s[p] += k;
    return;
  }
  push_down(p);
  if (((l + r) >> 1) >= ul) update((p << 1), l, ((l + r) >> 1), ul, ur, k);
  if (((l + r) >> 1) < ur)
    update((p << 1 | 1), ((l + r) >> 1) + 1, r, ul, ur, k);
  s[p] = max(s[(p << 1)], s[(p << 1 | 1)]);
}
int main() {
  for (int i = 0; i < 1000005; i++) {
    mxx[i] = mxy[i] = (long long)-1e17;
  }
  cin >> n >> m >> q;
  long long w;
  for (int i = 1; i <= n; i++) {
    read(x[i]), read(w);
    mxx[x[i]] = max(mxx[x[i]], -w);
  }
  sort(x + 1, x + n + 1);
  for (int i = 1; i <= m; i++) {
    read(y[i]), read(w);
    mxy[y[i]] = max(mxy[y[i]], -w);
    b[++tot] = y[i];
  }
  sort(b + 1, b + tot + 1);
  tot = unique(b + 1, b + tot + 1) - b - 1;
  for (int i = 1; i <= m; i++) {
    y[i] = lower_bound(b + 1, b + tot + 1, y[i]) - b;
    if (!vis[y[i]]) {
      update(1, 1, tot, y[i], y[i], mxy[b[y[i]]]);
      vis[y[i]] = 1;
    }
  }
  for (int i = 1; i <= q; i++) {
    read(a[i].x), read(a[i].y), read(a[i].w);
  }
  sort(a + 1, a + q + 1);
  int p = 1;
  long long ans = (long long)-1e17;
  for (int i = 1; i <= n; i++) {
    while (p <= q && a[p].x < x[i]) {
      int id = upper_bound(b + 1, b + tot + 1, a[p].y) - b;
      if (id <= tot) {
        update(1, 1, tot, id, tot, a[p].w);
      }
      p++;
    }
    ans = max(ans, s[1] + mxx[x[i]]);
  }
  cout << ans << endl;
  return 0;
}
