Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given two arrays of integers nums1 and nums2, possibly of different lengths. The values in the arrays are between 1 and 6, inclusive.
In one operation, you can change any integer's value in any of the arrays to any value between 1 and 6, inclusive.
Return the minimum number of operations required to make the sum of values in nums1 equal to the sum of values in nums2. Return -1​​​​​ if it is not possible to make the sum of the two arrays equal.
 
Please complete the following python code precisely:
```python
class Solution:
    def minOperations(self, nums1: List[int], nums2: List[int]) -> int:
```