#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 1;
long long a[maxn], b[maxn];
vector<pair<long long, long long>> g[maxn];
const long long inf = 1e18;
struct node {
  int l, r;
  long long w, lazy;
} tree[maxn << 2];
void pushup(int x) { tree[x].w = max(tree[x << 1].w, tree[x << 1 | 1].w); }
void pushdown(int x) {
  if (tree[x].lazy) {
    tree[x << 1].w += tree[x].lazy;
    tree[x << 1 | 1].w += tree[x].lazy;
    tree[x << 1].lazy += tree[x].lazy;
    tree[x << 1 | 1].lazy += tree[x].lazy;
    tree[x].lazy = 0;
  }
}
void build(int x, int l, int r) {
  tree[x].l = l, tree[x].r = r;
  if (l == r) {
    tree[x].w = -b[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  pushup(x);
}
void update(int x, int l, int r, long long v) {
  if (l <= tree[x].l && tree[x].r <= r) {
    tree[x].w += v;
    tree[x].lazy += v;
    return;
  }
  pushdown(x);
  int mid = (tree[x].l + tree[x].r) >> 1;
  if (r <= mid)
    update(x << 1, l, r, v);
  else if (l > mid)
    update(x << 1 | 1, l, r, v);
  else
    update(x << 1, l, mid, v), update(x << 1 | 1, mid + 1, r, v);
  pushup(x);
}
int main() {
  int n, m, p, t;
  long long x, y, ans = -inf;
  scanf("%d %d %d", &n, &m, &p);
  for (int i = 0; i < maxn; ++i) a[i] = b[i] = inf;
  for (int i = 1; i <= n; ++i) scanf("%lld%lld", &x, &y), a[x] = min(a[x], y);
  for (int i = 1; i <= m; ++i) scanf("%lld%lld", &x, &y), b[x] = min(b[x], y);
  for (int i = 1; i <= p; ++i) {
    scanf("%lld %d %lld", &x, &t, &y);
    g[x].push_back({t, y});
  }
  build(1, 1, 1e6);
  for (int i = 1; i < maxn; ++i) {
    ans = max(ans, tree[1].w - a[i]);
    for (auto to : g[i])
      if (to.first + 1 <= 1e6) update(1, to.first + 1, 1e6, to.second);
  }
  printf("%lld\n", ans);
}
