#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 3;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= (n / 2); ++i) {
    for (long long j = 1; j <= (m); ++j) {
      cout << i << " " << j << '\n';
      cout << n + 1 - i << " " << m + 1 - j << '\n';
    }
  }
  if (n % 2 == 0)
    return 0;
  else {
    long long x = n / 2 + 1;
    deque<long long> dq;
    for (long long i = 1; i <= (m); ++i) dq.push_back(i);
    while (dq.size()) {
      cout << x << " " << dq.front() << '\n';
      dq.pop_front();
      if (dq.size()) {
        cout << x << " " << dq.back() << '\n';
        dq.pop_back();
      }
    }
  }
  return 0;
}
