#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  scanf("%lld", &n);
  scanf("%lld", &m);
  for (long long i = 1; i <= (n / 2); i++) {
    for (long long j = 1; j <= m; j++) {
      printf("%lld %lld\n", i, j);
      printf("%lld %lld\n", (n + 1 - i), (m + 1 - j));
    }
  }
  if (n & 1 == 1) {
    for (long long i = 1; i <= (m / 2); i++) {
      printf("%lld %lld\n", (n / 2) + 1, i);
      printf("%lld %lld\n", (n / 2) + 1, (m + 1 - i));
    }
    if (m & 1 == 1) printf("%lld %lld\n", (n / 2) + 1, (m / 2) + 1);
  }
}
