#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
#pragma GCC target("avx,avx2")
using namespace std;
template <class t>
inline t read(t &x) {
  char c = getchar();
  bool f = 0;
  x = 0;
  while (!isdigit(c)) f |= c == '-', c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  if (f) x = -x;
  return x;
}
template <class t, class... A>
inline void read(t &x, A &...a) {
  read(x);
  read(a...);
}
template <class t>
inline void write(t x) {
  if (x < 0)
    putchar('-'), write(-x);
  else {
    if (x > 9) write(x / 10);
    putchar('0' + x % 10);
  }
}
const long long N = 2e5 + 5;
long long a[N], b[N], n, m;
struct node {
  long long a, b, ma;
  inline node operator+(const node &nt) const {
    return {max(a, nt.a), max(b, nt.b), max({ma, nt.ma, b + nt.a})};
  }
} tr[N << 2];
void build(long long x, long long l, long long r) {
  if (l == r) {
    tr[x] = {b[l] + a[l - 1], b[l] - a[l - 1], (long long)-1e17};
    return;
  }
  long long mid = l + r >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  tr[x] = tr[x << 1] + tr[x << 1 | 1];
}
node que(long long x, long long l, long long r, long long p, long long q) {
  if (p <= l && r <= q) return tr[x];
  long long mid = l + r >> 1;
  node A, B;
  long long op = 0;
  if (p <= mid) A = que(x << 1, l, mid, p, q), op++;
  if (q > mid) B = que(x << 1 | 1, mid + 1, r, p, q), op += 2;
  if (op == 1) return A;
  if (op == 2) return B;
  return A + B;
}
signed main() {
  read(n, m);
  for (long long i = 1; i <= n; i++) a[n + i] = read(a[i]);
  for (long long i = 1; i <= n; i++) b[i] = b[n + i] = read(b[i]) << 1;
  for (long long i = 1; i <= n << 1; i++) a[i] += a[i - 1];
  build(1, 1, n << 1);
  for (long long i = 1, l, r; i <= m; i++) {
    read(l, r);
    if (l <= r)
      write(que(1, 1, n << 1, r + 1, l + n - 1).ma);
    else
      write(que(1, 1, n << 1, r + 1, l - 1).ma);
    puts("");
  }
}
