#include<iostream>
#include<cstring>
using namespace std;

int S,T,U,N,O,D;
int e[100], c[100];
int a[100], h[100];
int dp1[101][101][101], dp2[10100], dp3[101][101];

int main(){
  cin >> S >> T >> U >> N >> O >> D;

  int C = 0;
  for(int i=0;i<T;i++)cin >> e[i] >> c[i], C += c[i];
  for(int i=0;i<N;i++)cin >> h[i] >> a[i];

  memset(dp1,-1,sizeof(dp1));
  dp1[0][0][0] = 0;
  for(int i=0;i<T;i++){
    for(int j=0;j<=U;j++){
      for(int k=0;k<=S;k++){
	if(dp1[i][j][k] < 0)continue;
	dp1[i+1][j][k] = max(dp1[i+1][j][k], dp1[i][j][k]);
	if(j+1<=U && k+e[i]<=S){
	  dp1[i+1][j+1][k+e[i]] = max(dp1[i+1][j+1][k+e[i]], dp1[i][j][k] + c[i]);
	}
      }
    }
  }

  memset(dp2,0,sizeof(dp2));
  for(int i=0;i<N;i++){
    for(int j=0;j<=C;j++){
      if(j+a[i]<=C)dp2[j+a[i]] = max(dp2[j+a[i]], dp2[j] + h[i]);
    }
  }

  memset(dp3,-1,sizeof(dp3));
  dp3[0][S] = 0;
  for(int i=0;i<D;i++){
    for(int j=0;j<=S;j++){
      if(dp3[i][j]<0)continue;
      for(int k=0;k<=j;k++){
	if(dp1[T][U][k]<0)continue;
	int nextS = min(S, j-k+O);
	dp3[i+1][nextS] = max(dp3[i+1][nextS], dp3[i][j] + dp2[dp1[T][U][k]]);
      }
    }
  }

  int res = -1;
  for(int i=0;i<=S;i++)res = max(res, dp3[D][i]);
  cout << res << endl;
}