#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long powermodm(long long x, long long n, long long M) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
long long power(long long _a, long long _b) {
  long long _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a);
    _b /= 2;
    _a = (_a * _a);
  }
  return _r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  if (n % 2 == 0) {
    for (int i = 1; i <= n / 2; i++) {
      for (int j = 1; j <= m; j++) {
        cout << i << " " << j << "\n";
        cout << n - i + 1 << " " << m - j + 1 << "\n";
      }
    }
  } else {
    for (int i = 1; i <= n / 2; i++) {
      for (int j = 1; j <= m; j++) {
        cout << i << " " << j << "\n";
        cout << n - i + 1 << " " << m - j + 1 << "\n";
      }
    }
    long long x = n / 2 + 1;
    for (int i = 1; i <= m / 2; i++) {
      cout << x << " " << i << "\n";
      cout << x << " " << m - i + 1 << "\n";
    }
    if (m % 2 == 1) {
      cout << x << " " << m / 2 + 1;
    }
  }
  return 0;
}
